SAP NEWS-750-ABAP CDS



Get Example source ABAP code based on a different SAP table
  



ABAP_CDS in ABAP Release 7.50
ITOC
BEGIN_SECTION SAP_INTERNAL_HINT
The operator IS [NOT] NULL can be used in ON- and HAVING-conditions. It is not known since when.
END_SECTION SAP_INTERNAL_HINT

ABAP_MODIFICATION_NN CDS Table Functions

The new DDL statement DEFINE TABLE FUNCTION can be used to define CDS table functions as a new category of CDS entities. In platform-specific SQL, a CDS table function is implemented in an associated AMDP function implementation.

ABAP_MODIFICATION_NN CDS Access Control

ABAP CDS access control, introduced in ABAP_RELEASE 7.40, SP10, was expanded to include implicit evaluations of CDS roles defined in the ABAP CDS DDL in AB_SQL . If a CDS entity is associated with a CDS role, an additional access condition is checked by default when the CDS entity is accessed using AB_SQL . Only that data is read for which the current user has an authorization or that matches a literal condition.

ABAP_MODIFICATION_NN Expressions and Functions

The following enhancements have been implemented:
Enhancements to the CAST expression of a CDS view:
A CAST expression now contain nested cast expressions and case distinctions as an operand.
Data elements can now be specified as the target type in CAST expressions. This passes its semantic properties to the result. This also makes it possible to map more built-in types to itself than previously.
In CAST expressions, the restriction no longer applies that casts of operands of the types DEC, CURR, and QUAN to the same types expect the target type to be long enough. In casts from NUMC to NUMC, however, the lengths must now match exactly.
CAST expressions can now be used to cast operands of the types DATS and TIMS to CHAR (if the length of the target type is sufficient).
A one character literal with the type NUMC can now be compared with a data source of the type LANG.
New SQL functions for CDS views:
String functions: CONCAT_WITH_SPACE, INSTR, LEFT, LENGTH, LTRIM, RIGHT, RPAD, RTRIM
Byte string functions: BINTOHEX , HEXTOBIN
Date functions and time functions for CDS views :
The special date functions DATS_DAYS_BETWEEN, DATS_ADD_DAYS, and DATS_ADD_MONTHS make it possible to calculate with values of the built-in dictionary type DATS in CDS views.
The new date function DATS_IS_VALID checks the validity of dates.
The new time function TIMS_IS_VALID checks the validity of times.
The new time stamp functions TSTMP_IS_VALID, TSTMP_CURRENT_UTCTIMESTAMP, TSTMP_SECONDS_BETWEEN and TSTMP_ADD_SECONDS perform operations with time stamps in packed numbers.
Input parameters from the parameter list parameter_list of a CDS view can be passed to many arguments of built-in functions.
In the conversion functions UNIT_CONVERSION and DECIMAL_SHIFT, the result type was set to the data type QUAN or CURR with length 31 and 14 decimal places.

ABAP_MODIFICATION_NN Session Variables

When a CDS view is accessed using AB_SQL , three session variables ( $session.user, $session.client, and $session.system_language) can be accessed here. In these variables, the values of the system fields sy-uname, sy-mandt and sy-langu are available.

ABAP_MODIFICATION_NN CDS Views with Input Parameters

In ABAP_RELEASE 7.50 and higher, the input parameters of CDS views are supported by all database platforms and can be used in AB_SQL . It is no longer necessary to query property VIEWS_WITH_PARAMETERS using method USE_FEATURES of class CL_ABAP_DBFEATURES. Querying this property results in a warning check from the syntax check.

ABAP_MODIFICATION_NN Annotation for Input Parameters

An input parameter of a CDS view or a CDS table function can now be annotated with an annotation @Environment.systemField. The potential values of the annotation assign ABAP system fields to the input parameters. If a CDS entity of this type is used a data source in AB_SQL , the assigned values can be passed implicitly. In particular, the value #CLIENT enables the client ID of the current client to be passed implicitly, which provides support for client handling in Native SQL of the implementation of a CDS table function.

ABAP_MODIFICATION_NN API for Evaluation of Annotations

The class CL_DD_DDL_ANNOTATION_SERVICE contains methods for evaluating the annotations of CDS entities.

ABAP_MODIFICATION_NN Exposing CDS Associations

Path expressions can now be published with more than one association in the SELECT list of a CDS view. The fields of the source data source from the ON condition of the published associated, which then also need to be specified, must be defined using an appropriately specified path.
BEGIN_SECTION SAP_INTERNAL_HINT
This feature was already documented, but it was not possible before.
END_SECTION SAP_INTERNAL_HINT

ABAP_MODIFICATION_NN Extensions

The statement EXTEND VIEW for CDS view extensions was expanded as follows:
Associations for the SELECT statement of the extended CDS view can now be specified after EXTEND VIEW.
The following can now be specified in the extension list select_list_extension:
Input parameters of the extended CDS view
Path expressions for custom associations and for associations of the extended CDS view
Special functions