What are CDS Views?
Core Data Services (CDS) views are advanced data models introduced by SAP to develop calculated views and information structures directly at the HANA database level. These views enable the centralization and optimization of business logic to meet a variety of analytical and transactional needs.
SAP and Standard CDS Views
SAP provides a wide range of ready-to-use standard CDS views to cover various functional areas (finance, logistics, human resources management, etc.). These views enable users to access operational data directly with little or no additional development.
Thousands of standard CDS views are available, depending on the activated modules (SAP S/4HANA, SAP ECC) and versions. Here is an example of the approximate number of CDS views published in SAP S/4HANA on-premise / private cloud for data extraction:
- 2019 version: 500 extractors (approximately 10% Delta-compatible)
- 2020 version: 1,100 extractors (approximately 10% Delta-compatible)
- 2021 version: 1,800 extractors (approximately 15% Delta-compatible)
- 2022 version: 2,400 extractors (approximately 18% Delta-compatible)
- 2023 version: 2,800 extractors (approximately 20% Delta-compatible)
Differentiation of CDS Views
CDS Views are distinguished by their structure and annotations, which define their behavior and usage.
Types of CDS Views:
Basic Views: Represent the base layers of the tables.
Composite Views: Combine multiple views or base tables.
Consumption Views: Designed to be consumed directly by analytical tools.
Maintenance and Enhancement of CDS Views
It is possible to modify or enhance a standard CDS View, but care must be taken to preserve the integrity of the SAP systems.
Direct modification:
- Not recommended, as SAP updates could overwrite the changes.
- Risk of losing SAP support in the event of a problem.
Copy and paste:
- Recommended approach: Copy a standard CDS View and create a Z (custom) version.
- Use extensions (EXTEND VIEW) to add fields or modify behavior without altering the original view.
Adding calculated fields:
Use SQL expressions (e.g., CASE, SUM) to add new calculations.
Creating input parameters:
Include dynamic parameters to filter the data (e.g., date range).
Customized security:
Implement access control rules using annotations such as DCL.
CDS Views Usage
CDS Views can be used directly in several native SAP reporting tools:
SAP Fiori (S/4HANA Analytics):
- Consumption views can be used to create Fiori applications (KPIs, analytical lists, etc.).
- Users can interact with dynamic data in real time.
SAP Query Browser:
Allows you to explore the analytical views provided by CDS.
SAP Analytics Cloud (SAC):
Direct connection to CDS Views for advanced analysis.
CDS Views can be integrated with third-party tools such as Power BI using data exposure services.
OData connection :
CDS Views exposed as OData services can be used by Power BI.
Direct extraction:
Use the SAP connectors available in Power BI to access the data.
Best practices:
- Limit data volumes to improve performance.
- Apply complex transformations directly in the CDS View to reduce the processing load in Power BI.
In conclusion…
CDS Views provide a quick way to access data directly within the ERP system and use it in real time with SAP Analytics tools—but that’s not all. SAP is constantly updating these CDS Views because they embody the data model of its ERP systems. They form the foundation for building reports across all SAP Analytics tools.