- Starting with ABAP release 7.76, a new CDS entity called the CDS projection view has been introduced.
- CDS Projection Views based on another CDS View Entity and can be defined using statement DEFINE VIEW ENTITY AS PROJECTION.
- A projection view, often known as the consumption layer, is typically the top layer of a CDS data model. It customizes the data model to suit specific service requirements.
Types of Projection View: Here’s an overview of the types of CDS projection views you might encounter:
- CDS transactional query: CDS transactional queries are used for modelling the projection layer of a RAP business object.
➢ They can be used in ABAP programs as a data type for definitions and in ABAP SQL read statements.
➢ Only CDS view entities or CDS DDIC-based views can be basis entities.
➢ Associations can be added, but their fields cannot be used directly. They are intended solely to establish relationships.
➢ A transactional projection view must always be part of a business object.
Example:

2. CDS transactional interfaces: CDS transactional interfaces act as a consistent public interface layer within a CDS data model. They are commonly utilized in the ABAP RESTful Application Programming Model to establish the foundation for a RAP Business Object (BO) interface.
➢ A transactional interface is typically classified by a release contract to ensure specific stability criteria.
➢ In a developer extensibility scenario, you aim to establish stable extension points that remain secure against upgrades and consistent throughout their lifecycle. To achieve this, you use a transactional interface to define these extension points, ensuring their stability and reliability throughout the entire lifecycle.
➢ A CDS transactional interface is created using the CDS DDL statement DEFINE VIEW ENTITY AS PROJECTION ON, and it must be configured with the provider contract set to TRANSACTIONAL_INTERFACE.
Example:

3. CDS analytical queries: CDS analytical projection views are intended for modeling analytical queries within a CDS data model. The projected entity must be either an analytical cube view or an analytical dimension view. The functionality available is limited to the capabilities of the analytical engine’s runtime.
➢ Analytical projection views are transient projection views defined with the keyword DEFINE TRANSIENT VIEW ENTITY AS PROJECTION ON. That means that only a runtime object on the ABAP server is generated.
➢ No SQL view is created on the database.
➢ An analytical query cannot be used as data source of other CDS entities.
➢ CDS analytical projection views improve on the previous version of CDS Analytical Queries.
➢ They offer advantages such as avoiding the generation of an SQL artefact, reducing the need for annotations, and an improved syntax check.
➢ Moreover, they use the new features of CDS view entities, such as typed literals and improved amount and quantity handling

Thanks for visiting!
Sangeeta Singh

Leave a Reply