SAP CDS



Get Example source ABAP code based on a different SAP table
  


VERSION 5 IN

ABAP - Core Data Services (ABAP CDS)
The ABAP Core Data Services (ABAP CDS) are the implementation of the general CDS concept for AS ABAP. ABAP CDS makes it possible to define semantic data models on the standard database of an AS ABAP and support ABAP RAP using behavior models.
The entities of the data models defined in ABAP CDS provide enhanced access functions compared to previous DDIC database tables and DDIC views defined in ABAP Dictionary, thus enabling the optimization of AB-SQL -based applications. This is particularly the case if an AS ABAP uses an SAP HANA database, since its in-memory characteristics can be used optimally.
ABAP RAP is based both on the data models defined in ABAP CDS and on special RAP objects, which model behavior.
The data models are defined in the form of CDS objects using the CDS TDL, CDS DDL, CDS SDL, and CDS DCL provided by ABAP CDS in the syntax of ABAP CDS in CDS source code. CDS annotations can be used to define metadata for CDS objects.
Data exchange between ABAP CDS data models and data models on different platforms is possible using CDS schema notation (CSN). CSN is a data format for data exchange between data models and it can be used, for example, to exchange metadata between ABAP CDS and SAP Analytics Cloud (SAC).
CDS Annotations A CDS annotation adds metadata to a CDS object. Annotations can be specified in DDL source code, SDL source code, and DCL source code and outsourced to metadata extensions. Annotation definitions can be used to created an annotation itself as a CDS object. An annotation definition prescribes how an annotation is used.
CDS Type Definitions CDS type definitions are created using the CDS TDL. They define data types natively in ABAP CDS. They can be enhanced with CDS annotations and they can be used for typing in CDS entities and in ABAP.
CDS Function Definitions CDS function definitions are created using the CDS FDL. CDS function definitions allow the definition of user-defined CDS functions that encapsulate algorithms in reusable code that can be used in operand positions of CDS entities. There is currently only one type of CDS function definition:
CDS Scalar Functions
CDS function definitions that are implemented in AMDP functions and return a scalar result.
CDS Data Definitions CDS data definitions are created using the CDS DDL of the ABAP CDS in DDL source code. They define the following CDS entities that can be accessed as a data type in ABAP programs and as a data source in reading AB-SQL statements.
CDS View Entities
CDS entities that use SQL to access other data sources and can be enriched semantically using annotations.
CDS Projection Views
CDS entities that are based on a CDS view and project a subset of its elements.
CDS Table Functions
CDS entities that are implemented in AMDP functions and return a tabular result set.
CDS Hierarchies
CDS entities that create an SQL hierarchy from a data source.
CDS Custom Entities
CDS entities for data models whose runtime is implemented manually.
CDS Abstract Entities
CDS entities that describe only type properties and for which no database objects are instantiated.
ABAP_CDS_V1_VIEWS
CDS entities that use SQL to access other data sources and can be enriched semantically using annotations. These entities are technically based on dictionary objects and were superseded from release ABAP_781 on by CDS view entities, which are no longer based on dictionary objects. The CDS DDL in ABAP CDS also contains language elements for enhancing CDS entities.
CDS tuning objects ABAP tuning objects for CDS objects to define technical settings and tunings that can be transported separately.
CDS Access Control CDS access control is based on CDS roles that are defined in CDS DCL in DCL source code. When CDS SQL entities that are assigned a CDS role are accessed, additional access conditions are evaluated by default.
CDS System Entities CDS system entities are predefined CDS entities for common usage in ABAP CDS and ABAP SQL.

ABAP_FURTHER_INFO
For further details on ABAP Core Data Services, check the ABAP Data Models development guide on SAP Help Portal.



Latest notes:

CDS objects are transported using the CDS source code. The actual objects, like the CDS entities that are defined using a CDS data definition in DDL source code, are created after the transport by being activated in the target system.
CDS source code can only be programmed in the Eclipse-based ABAP Development Tools (ADT). There are different editors for the Data Definition Language (DDL), the Service Definition Language (SDL), and the Data Control Language (DCL). The ADT documentation describes how these editors are used.
NON_V5_HINTS
CDS source code can also be displayed in the Repository Browser of the ABAP Workbench.
ABAP_HINT_END