Getting Started With CDS Views
Getting Started With CDS Views
Basic : these are used to bring data directly from the physical tables in the
database.
Composite : this type of view is used to link basic views together through
associations (like SQL joins between views). They are then used by the
consumption views.
Consumption : these views allow you to create a specific query from a
“composite” view. This is the only type of view that can be exposed to the OData
or transient service to be consumed for reporting.
In all cases, their development goes through Eclipse, through a plugin. This tool is called
ADT (ABAP Development Tools).
Menu Window -> Perspective -> Open Perspective -> Other, change the
perspective to ABAP Perspective.
Create a new ABAP Project in File -> New -> ABAP Project.
Choose the system on which you want to develop and enter the login and
password.
Once connected, we can create our first “View”.
To create a view, right-click in the tree, then New -> New Data Definition.
Choose the transport. The transport in SAP is the tool for transferring objects
from one environment to another.
CDS Views are defined in a source DDL and at activation time it generates two objects :
SQL View : this is an invisible object in the ABAP dictionary that cannot be
modified.
CDS View
The simplest form of CDS View is the projection, i.e. a selection of fields from a single
table. The name of a view specified in @ABAPCatalog.sqlViewName must be different
from the name of the CDS entity and their names cannot exceed sixteen characters.