With the evolution of SAP’s technology stack, Core Data Services (CDS) views have become a foundational element in building efficient, reusable, and high-performing data models in SAP S/4HANA environments. CDS views enable semantic-rich data definitions directly at the database layer, supporting real-time analytics and transactional reporting without data duplication.
When combined with SAP HANA Live, CDS views deliver a powerful real-time Virtual Data Model (VDM), empowering business processes and analytical applications. This article outlines the best practices for developing CDS views tailored to S/4HANA systems, ensuring performance, maintainability, and scalability.
SAP recommends structuring CDS views following the Virtual Data Model (VDM) approach which consists of three layers:
Best Practice:
Associations in CDS views are semantic links between entities, enabling SAP to optimize query execution and improve readability.
Best Practice:
0..1, 1..*).Annotations provide metadata to enhance the functionality and integration of CDS views.
Best Practice:
@Analytics.query: true to expose views as analytical queries.@UI.headerInfo, @UI.lineItem) for seamless integration with SAP Fiori and analytical tools.@AccessControl.authorizationCheck for built-in security enforcement.@EndUserText to improve understandability.CDS views execute directly in the SAP HANA database; hence, optimization at this level is critical.
Best Practice:
SELECT *.@DefaultAggregation on measures to improve performance in analytical scenarios.Efficient CDS development encourages reuse and easier maintenance.
Best Practice:
I_ for Interface, C_ for Composite, Y_/Z_ for custom).Data security is paramount, especially in enterprise environments with sensitive data.
Best Practice:
@AccessControl.authorizationCheck) to restrict data access.SAP continuously improves CDS capabilities and provides guidance through official documentation, notes, and community forums.
Best Practice:
Developing robust and efficient CDS views for SAP S/4HANA within the SAP HANA Live framework requires adherence to a set of best practices focusing on architecture, performance, security, and reusability. By following these guidelines, organizations can unlock the full potential of real-time analytics and transactional reporting, ensuring their SAP landscape remains agile, scalable, and aligned with business needs.
Keywords: SAP HANA Live, CDS Views, S/4HANA, Virtual Data Model, SAP Fiori, Performance Optimization, Authorization, Data Modeling.