What are CDS Views?
Core Data Services (CDS) views are advanced data models introduced by SAP to develop computed views and information structures directly at the HANA database level. These views enable business logic to be centralized and optimized to meet a variety of analytical and transactional needs.
SAP and standard CDS Views
SAP delivers a large number of ready-to-use standard CDS Views to cover various functional areas (finance, logistics, human resources management, etc.). These views enable operational data to be consumed directly, with little or no additional development.
Thousands of standard CDS Views are available, depending on the modules activated (SAP S/4HANA, SAP ECC) and versions. Here, for example, is an order of magnitude of the number CDS Views published in SAP S/4HANA on-premise / Private Cloud for data extraction:
- version 2019 : 500 extractors (approx. 10% delta-compatible)
- version 2020: 1100 extractors (approx. 10% delta compatible)
- version 2021: 1800 extractors (about 15% delta compatible)
- version 2022: 2400 extractors (about 18% delta compatible)
- version 2023: 2800 extractors (approx. 20% delta-compatible)
Differentiating CDS Views
CDS Views are distinguished by their structure and annotations, which define their behavior and usage.
Types of CDS Views:
Basic Views: Represent basic table layers.
Composite Views: Combine several views or base tables.
Consumption Views: Designed to be directly consumed by analytical tools.
Maintenance and enrichment of CDS Views
It is possible to modify or enrich a standard CDS View, but care should be taken to preserve the integrity of SAP systems.
Direct modification :
- Not recommended, as SAP updates may overwrite modifications.
- Risk of losing SAP support in the event of a problem..
Copy and extend :
- Recommended approach: Copy a standard CDS View and create a Z (customized) 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.
Create input parameters :
Integrate dynamic parameters to filter data (example: date range).
Customized security :
Implement access control rules via annotations like DCL.
Consumption of CDS Views
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 exposed 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, through data exposure services..
OData connection :
CDS Views exposed as OData services can be consumed by Power BI.
Direct extraction :
Use SAP connectors provided in Power BI to access data.
Best practices :
- Limit data volumes to improve performance.
- Apply complex transformations directly in CDS View to reduce processing load in Power BI.
In conclusion…
CDS Views represent a fast way to access data directly in the ERP and consume it in real time with SAP’s Analytics tools, but not only. SAP is constantly updating these CDS Views, as they embody the ERP data model. They are the basis for building reporting on all SAP Analytics tools.