AS ABAP Release 758, ©Copyright 2024 SAP SE. All rights reserved.
ABAP - Keyword Documentation → ABAP - ABAP Release News → News for ABAP Release 7.5x → News for ABAP Release 7.58 →
ABAP CDS in ABAP Release 7.58
CDS Analytical Projection View, Projected Entity
CDS analytical projection views can now also have
analytical dimension views as
projected entity.
@AbapCatalog.preserveKey is Obsolete
The CDS annotation @AbapCatalog.preserveKey is obsolete and has partly a different behavior now.
The annotation was used before release 7.58 to define the key fields of the CDS-managed DDIC view of an obsolete CDS DDIC-based view. The annotation can be kept in existing data definitions, but it does not have an effect any more and leads to a syntax check warning. The key fields of the CDS-managed DDIC view are always defined by the addition key in the SELECT list.
The change in behavior between 7.57 and 7.58 is incompatible. The key fields of the CDS-managed DDIC
view of an obsolete CDS DDIC-based view are defined differently now for views where the annotation was
not specified or where it was specified with the value false. The value
false was used to define the key fields of the CDS-managed DDIC view as
for a DDIC database views in ABAP Dictionary, regardless of the addition KEY.
It was also the standard value, when the annotation was not specified. Now, the behavior is always as for the value true.
Release of CDS Simple Types
CDS simple types define
elementary data types natively in
ABAP CDS. A CDS simple type can be enriched with metadata using
CDS annotations. The
syntax statement for defining a CDS simple type is DEFINE TYPE.
Release of CDS Enumerated Types
CDS enumerated types define enumerated types natively in ABAP CDS. The syntax statement for defining a CDS enumerated type is DEFINE TYPE ENUM.
CDS enumerated types can be used as follows:
Annotation Environment.sql.passValue, Scope Enhancement
The ABAP annotation Environment.sql.passValue is now also available for
CDS parameters in CDS view entities, CDS projection views, and CDS hierarchies. The annotation scope has been enhanced.
New Annotation Environment.sql.passValueForClient
A new ABAP annotation is available in CDS view entities, CDS projection views, and CDS hierarchies: Environment.sql.passValueForClient.
It works in a similar way to the annotation Environment.sql.passValue,
but for client fields. It specifies whether a placeholder ? or a literal value is passed to the database in an ABAP SQL condition when the client field is compared with a host variable.
New Cardinality Syntax for Associations and Joins
A new syntax for specifying the cardinality of CDS associations, CDS joins, and of filter conditions of CDS path expressions is now available:
This syntax allows a source and a
target cardinality to be specified, while the previously available
numeric syntax only allowed the target cardinality to be specified. The new cardinality syntax can be used to improve query performance. It is available in
CDS view entities,
CDS projection views,
CDS custom entities, and
CDS abstract entities.
CDS Scalar Functions
The new CDS entity is available: the CDS scalar function. It is defined using the CDS DDL statement DEFINE SCALAR FUNCTION. A CDS scalar function is linked with an AMDP function in which it is implemented using SQLScript.
As of this release, scalar functions are available for two different runtimes:
Extension of the CAST Matrix
The matrix of types that can be converted to each other using CAST has been enhanced for CDS DDIC-based views (obsolete) and for CDS view entities. Data types DECFLOAT16 and DECFLOAT34 can now be cast into data type CURR.
CDS Transactional Interface, WHERE Clause
A WHERE condition is now available also for
CDS transactional interfaces to restrict the result set that is returned when the transactional interface is accessed.
Further Operand Positions for Typed Literals
Typed literals can now be used in more operand positions in ABAP CDS. They can now be used in the WHERE condition of
CDS projection views and in the ON condition of
CDS associations.
$projection References on Path Expressions
A reuse expression $projection.Field can now also be used to reuse fields selected via a
path expression.