What is a CDS View Entity?
A CDS View Entity is the foundation of every RAP Business Object. It defines the business data model that is later enhanced through Behavior Definitions and exposed through OData services.
CDS View Entities are SAP's recommended approach for data modeling in ABAP Cloud and SAP S/4HANA Public Cloud. They replace classical CDS Views and provide a cleaner and more efficient development model.
SAP Recommendation
Why CDS View Entities?
Before CDS View Entities, developers used classic CDS Views that required SQL View Names and additional metadata objects.
CDS View Entities simplify development, improve activation performance and align better with SAP's Clean Core strategy.
Classic CDS View vs CDS View Entity
| Classic CDS View | CDS View Entity |
|---|---|
| Requires SQL View Name | No SQL View Name Required |
| Older Technology | Latest SAP Standard |
| More Metadata Objects | Simplified Architecture |
| Not Recommended for New Development | SAP Recommended |
Creating Your First CDS View Entity
The following example creates a Root CDS View Entity representing employee master data.
define root view entity ZI_EMPLOYEE
as select from zemployee
{
key employee_id as EmployeeId,
first_name as FirstName,
last_name as LastName,
department as Department,
email as Email
}Understanding the Syntax
Every keyword in the CDS definition serves a specific purpose within RAP architecture.
CDS Syntax Breakdown
| Keyword | Purpose |
|---|---|
| define | Starts CDS Definition |
| root | Main RAP Business Object |
| view entity | Creates CDS View Entity |
| as select from | Specifies Data Source |
| key | Primary Key Field |
| alias | Business Friendly Field Name |

Role of CDS View Entity in RAP
The CDS View Entity forms the Data Model Layer of RAP. All business logic, service exposure and Fiori applications are built on top of this foundation.
A well-designed CDS model significantly reduces future maintenance and simplifies RAP development.
RAP Architecture Layers
| Layer | Object | Purpose |
|---|---|---|
| Data Model | CDS View Entity | Business Data Model |
| Behavior | Behavior Definition | Business Logic |
| Implementation | Behavior Implementation | Custom Logic |
| Service | Service Definition | Expose Business Objects |
| Exposure | Service Binding | Publish OData Services |
| UI | Fiori Elements | Generate Applications |
Best Practice
Common Mistake
Public Cloud Considerations
In SAP S/4HANA Public Cloud, CDS View Entities should consume only released APIs and released CDS Views. Direct access to unreleased objects is not permitted.
Following SAP's Clean Core principles ensures future compatibility and smooth upgrades.
Learning Outcome
Next Steps
In the next lesson, we will learn Associations and understand how CDS View Entities are linked together to build business object relationships.