Types of CDS Views: Basic, Composite, Consumption, and Transactional
Understand the four VDM layers of SAP CDS Views — Basic, Composite, Consumption, and Transactional — and when each type is used.
The Four Types of CDS Views
SAP classifies CDS Views into four layers within the Virtual Data Model (VDM). Each layer has a distinct purpose and sits at a specific level in the data access hierarchy.
Basic Views
Basic Views (also called Interface Views) are the foundation layer. They sit directly on top of database tables and provide a clean, reusable abstraction. Basic Views typically:
- Select fields from one or a few database tables
- Rename technical field names to business-friendly names
- Add key field annotations and associations
- Do not contain business logic or calculated fields
Naming convention: I_<BusinessObject> (e.g., I_SalesOrder).
Composite Views
Composite Views combine multiple Basic Views to create richer business objects. They add joins, unions, and calculated fields to assemble data from multiple sources into a coherent entity.
- Join multiple Basic Views
- Add calculated fields and type conversions
- Still relatively generic and reusable
Naming convention: I_<BusinessObject><Aspect>.
Consumption Views
Consumption Views are the top layer, designed for direct use by applications, OData services, and analytical queries. They add UI annotations, authorization checks, and application-specific filtering.
- Carry
@UIannotations for Fiori rendering - Defined for specific use cases (list reports, analytical queries, etc.)
- Often exposed as OData entities via Service Definitions
Naming convention: C_<BusinessObject><UseCase>.
Transactional Views
Transactional Views enable create, update, and delete operations (not just read). They are used in the ABAP RESTful Application Programming Model (RAP) for transactional processing.
- Support draft handling and BOPF integration
- Carry
@ObjectModelannotations for behavior definition - Used by Fiori Elements apps with editing capabilities
Summary Table
| Type | Layer | Purpose | Naming |
|---|---|---|---|
| Basic | Foundation | Clean table abstraction | I_* |
| Composite | Middle | Joins and enrichment | I_* |
| Consumption | Top | App-specific, UI-ready | C_* |
| Transactional | Top | CRUD operations (RAP) | I_* / R_* |