What Is a CDS View in SAP S/4HANA?
A complete introduction to Core Data Services (CDS) Views in SAP S/4HANA — what they are, why they exist, and how they replace classical SQL views.
What Is a CDS View?
Core Data Services (CDS) is a data definition language introduced by SAP as a central part of the ABAP platform. A CDS View is a virtual database view defined in CDS DDL (Data Definition Language). Unlike classical SQL views, CDS Views carry rich metadata through annotations, support associations for navigation, and participate in the layered Virtual Data Model (VDM).
CDS Views are the backbone of the SAP S/4HANA data model. Almost every Fiori application, OData service, analytical query, and API in S/4HANA is built on top of CDS Views — they are the primary way to access and expose business data.
Why CDS Views Instead of SQL Views?
Traditional SQL views are database-level constructs with no semantic metadata. CDS Views add several critical capabilities:
- Annotations — Control UI rendering, OData exposure, search behavior, and access control directly in the view definition.
- Associations — Define navigation paths between views (similar to foreign keys but richer), enabling OData navigation properties and lazy joins.
- VDM Layering — Views are classified as Basic, Composite, Consumption, or Transactional, creating a clear separation of concerns. See VDM Explained.
- Release Contracts — SAP marks certain views as Released (C1 contract), guaranteeing backward compatibility. See Released APIs.
- Extensibility — CDS Views can be extended without modifying the original via CDS View Extensions.
Anatomy of a CDS View
A CDS View definition consists of:
- Annotations — Prefixed with
@, they control behavior (e.g.,@Analytics.dataCategory: #FACT). - DEFINE VIEW — The view declaration with a technical name (DDL name) and an optional SQL view name.
- SELECT — The data selection from source tables or other CDS Views, including joins and WHERE clauses.
- Associations — Navigation paths to related views, declared alongside the SELECT columns.
- Fields — The projected columns, which can be renamed, calculated, or cast.
CDS Views in SAP S/4HANA — Scale and Scope
A typical SAP S/4HANA system contains over 100,000 CDS Views across all functional areas — Finance (FI/CO), Sales (SD), Procurement (MM), Logistics, HR, and more. These views form complex dependency chains, where Consumption views read from Composite views, which in turn read from Basic views that access physical database tables.