ABAP - Keyword Documentation →  ABAP - Dictionary →  ABAP CDS in ABAP Dictionary →  ABAP CDS - Data Definitions → 

ABAP CDS - Views

A CDS view is defined for existing database tables and any other views or CDS views in ABAP Dictionary using the statement DEFINE VIEW in the CDS DDL in ABAP Core Data Services (CDS). This is done in the CDS source code of a CDS data definition in the ABAP Development Tools (ADT). When the CDS data definition of a CDS view is activated, two ABAP Dictionary objects area created:

The CDS entity represents the actual CDS view. It is based on a CDS database view and makes other attributes possible, such as access controls defined in CDS. The name of this entity, cds_entity, is defined in the definition of a CDS view after DEFINE VIEW. The definition of the CDS entity occurs only as CDS source code. The ABAP Dictionary tool in ABAP Workbench (SE11) does not recognize the CDS entity.
As a data type in ABAP Dictionary, the CDS entity represents a structured type with the elements of the CDS view as components and can be used like any CDS entity.
The CDS database view is the technical foundation of the CDS view in ABAP Dictionary. It is a read-only classic database view. The name CDS_DB_VIEW of this view is defined in the definition of a CDS view in the CDS annotation @AbapCatalog.sqlViewName. The ABAP Dictionary tool in ABAP Workbench (SE11) can display a CDS database view, but it cannot be edited here. When the view is activated, the corresponding SQL view is created with the same name.
As a data type in ABAP Dictionary, the CDS database view represents (like all classic database views) a flat structure with the elements of the CDS view as components. The CDS database view of a client-specific CDS view always has a client column, unlike the CDS entity.

Both the names cds_entity and CDS_DB_VIEW are in the namespace of the data types in ABAP Dictionary. The view is also known under both names within the CDS DDL of the ABAP CDS. Furthermore, only the CDS entity should be accessed in other CDS entities using its name cds_entity and not the CDS database view using the name CDS_DB_VIEW.

A CDS view has two types of keys:

In Open SQL, the key used is determined according to whether the name of the CDS entity or the name of the CDS database view is used to access a CDS view.

The following sections describe client handling and SAP buffering for CDS views:

Notes



Continue
ABAP CDS - Client Handling in CDS Views
ABAP CDS - SAP Buffering of CDS Views