DDL Source, SQL View and CDS View
A CDS View is defined in a DDL Source, which is a new type of repository object. There is no editor for DDL sources in the classical ABAP workbench. This new type of repository object must be analyzed and developed in ABAP Development Tools in Eclipse.
Upon activation of a DDL source, two objects are created: the SQL view and the CDS view. Neither of them can be edited directly.
The SQL view is visible as an object in the ABAP Dictionary where it cannot be edited and only reveals a fraction of the information available in the DDL source. It serves as a representative of the database object.
The CDS view carries more semantics than its SQL view. It is not created on the database and it is not visible in the ABAP Dictionary. It can, however, be consumed via open SQL. The new Open SQL syntax with NW 7.40 SP5 is required to access CDS views.
As with conventional database views, the simplest form of a CDS view is a projection – that is, a selection of fields from a single table.
The language used is SQL DDL, but in an Open SQL form so that the view can be deployed on any database platform. As CDS views are part of Open SQL, notice also that there is no explicit client handling.
The name of the CDS entity is specified after the DEFINE VIEW statement. It is recommended through not technically necessary, that the name of the DDL source and the name of the CDS view are identical.
The name of the SQL view is specified after the Annotation @ABAPCatalog .sqlViewName. It must be different from the name of the CDS entity. Like for any Dictionary view, the maximum length is 16 characters.
Annotations
A CDS annotation enriches a definition in the ABAP CDS with metadata. An annotation is identified by a simple or structured name after leading character “@” or “@<”.
View annotations: Relate to the view itself and are placed before the define view statement.
Element annotations: Relate to elements in the field list and can be found before or after the element.
Navigation from SQL view to DDL source
If you have located an SQL view and want to know how it is defined, right-click the SQL View in the project explorer and choose Open with -> Definition.
Active Annotations View
Graphical Editor
Dependency Analyzer
Data Preview
The toolbar on the Raw Data tab offers additional functions: