ABAP Keyword Documentation → ABAP - Release-Specific Changes → Changes in Releases 7.5x → Changes in Release 7.51
ABAP CDS in Release 7.51
Other versions:
7.31 | 7.40 | 7.54
Modification 1
Client Handling
The new annotation @ClientHandling specifies the client handling of CDS views and CDS table functions. It replaces the annotation @ClientDependent and makes it obsolete.
Modification 2
Expressions and Functions
The following enhancements have been implemented:
- In a CAST expression, operands of the types SSTRING can now be cast to types other than themselves and back. Here, the type SSTRING behaves like the data type CHAR.
- In a CAST expression, operands of the types CLNT, LANG, TIMS, and UNIT can now be cast to the types CHAR and SSTRING. Here, the target type must be specified as a data element.
- In a CAST expression, the data types CHAR, SSTR, and NUMC can now be cast to ACCP, and the other way round.
- Aggregate expressions can now be used as operands in a CAST expression.
-
New Functions
- The following additional date/time functions are now supported: ABAP_SYSTEM_TIMEZONE, ABAP_USER_TIMEZONE, TSTMP_TO_DATS, TSTMP_TO_TIMS, TSTMP_TO_DST, and DATS_TIMS_TO_TSTMP
- A new built-in conversion function FLTP_TO_DEC can be used to convert arguments of type FLTP to packed numbers.
- An addition AS dtype can now be specified for the aggregate expression AVG to determine the data type of the return value.
-
Conditions
- Built-in functions can now be specified on the right side of a cond_expr condition of a WHERE condition, an ON condition, a filter condition, or a complex case distinction.
- In cond_expr conditions, fields of data sources of the type ACCP can now be compared with fields of the same type, and with literals of the type NUMC.
The following changes have been made:
-
In CAST expressions
to data elements, the restriction no longer applies that the data type, the length, and the number of
decimal places of operand and target data type must match precisely. This restriction can now be applied
as an optional restriction using the new addition PRESERVING TYPE. This
addition specifies explicitly that casts are to be applied to the semantic attributes of a data element.
PRESERVING TYPE suppresses the syntax warning that handles casts of identical technical types.
Modification 3
Cross Join
As well as an inner and outer join, it is now possible to use a cross join in a SELECT statement.
Modification 4
Associations
- Associations can now be published for union sets formed with UNION. In this case, special rules apply.
- WITH DEFAULT FILTER can be used to specify a default filter condition for an association. This condition is used as a filter condition in a path expression if no condition is specified for the association here.
-
In a path expression,
*: can be used to declared an association as a polyvalent association explicitly.
Modification 5
Session Variables
When a CDS view is accessed
using ABAP SQL, it is possible to access the new session variable
$session.system_date in which the values of the system field sy-datum
are available.
Modification 6
CDS View Enhancements
The statement EXTEND VIEW can now be used to extend the following CDS views too:
- CDS views with aggregate expressions and a GROUP-BY clause
-
CDS views with a UNION clause for union sets
For enhancements of the GROUP-BY clause and UNION clauses, the existing CDS view must contain the new annotation array AbapCatalog.viewEnhancementCategory[ ] with suitable values. The value #NONE of this annotation array can be used to prevent any enhancements being made to a CDS view using CDS view enhancements.
Modification 7
Annotations
-
Annotation for Key Fields
-
Null Values of Annotations
-
Metadata Extensions
Caution
CDS variants are not currently released for general use. It is not possible to define
standalone CDS variants and the use of CDS variants in metadata extensions produces a syntax check warning.
Modification 8
Access Control
The following enhancements have been implemented in CDS access control:
- As well as conditional access rules, there are now also full access rules and inherited access rules.
- There is a new operator ?= for access conditions, which checks not only for a specified value but also the initial value or the null value.
-
A new user condition compares the value of an element of a CDS entity with the current user name.