SAP CDS V2 VIEWS



Get Example source ABAP code based on a different SAP table
  



ABAP_CDS - View Entities
A CDS view entity is a CDS entity defined using the statement DEFINE VIEW ENTITY in the CDS DDL of ABAP Core Data Services (CDS). A CDS view entity can be used to select fields from one or more data sources (database tables or other CDS entities). Additional semantic properties can be added by using annotations. CDS view entities are the successor of ABAP_CDS_V1_VIEWS . They have the same structure and serve the same purpose as ABAP_CDS_V1_VIEWS . Generally spoken, they represent an improved version of classic ABAP_CDS_V1_VIEWS .
When a CDS view entity is activated, a repository object is created. This repository object can be accessed using the name of the CDS view entity. As a global data type, each CDS view entity represents a structured type with the elements of the CDS view entity as components and can be used like any CDS entity:
In ABAP CDS, the CDS entity can be used as a data source of other CDS entities.
In ABAP programs, the CDS entity can be used as a data type and in AB-SQL read statements.
The CDS entity cannot be used as a data type for definitions of dictionary objects.
The name of the CDS entity is in the namespace of all global types of an AS ABAP.
The following sections describe client handling and table buffering for CDS view entities. Afterwards, the statement DEFINE VIEW ENTITY and all possible additions are described.
Client handling
Table buffering
Creation of a CDS view entity

ABAP_FURTHER_INFO
ABAP Data Models development guide, section about CDS view entities.



Latest notes:

The programming of CDS view entities using the DDL of the Core Data Services is one of the tasks included in the implementation of data models and is not usually the responsibility of regular ABAP application programmers. Once created, CDS view entities are used in ABAP programs using AB-SQL read statements and must be stable enough to allow this.
NON_V5_HINTS
ABAP_HINT_END
BEGIN_SECTION SAP_INTERNAL_HINT
Internally, the two kinds of CDS views - with or without ABAP_CDS_MNG_VIEWS - are called CDS views of version 1 or version 2 or V1, V2 respectively.
END_SECTION SAP_INTERNAL_HINT