SAP NEWS-761-ABAP CDS



Get Example source ABAP code based on a different SAP table
  



ABAP_CDS in ABAP Release 7.61
ITOC

ABAP_MODIFICATION_NN CDS Table Functions

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

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 platform-dependent SQL of the implementation of a CDS table function.

ABAP_MODIFICATION_NN API for Evaluation of Annotations

The class CL_DD_DDL_ANNOTATION_SERVICE has been made available for evaluating annotations. It contains methods used to read the annotations of CDS entities from the associated system tables.

ABAP_MODIFICATION_NN Expressions and Functions

The following enhancements have been implemented:
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.
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).
The following changes have been made:
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.
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.
In the function DATS_ADD_MONTHS , an invalid input date is now initialized or set to the value 00010101 and no longer produces an error.

ABAP_MODIFICATION_NN Extensions

The statement EXTEND VIEW for CDS view extensions was expanded as follows:
CDS 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 dedicated CDS associations and CDS associations of the extended CDS view
Special functions