SAP ABAP CDS Views – All You Need to Know

SAP ABAP CDS Views

With the advent of SAP HANA, operational data reporting has seen a remarkable transformation, laying the groundwork for Embedded Analytics. Transitioning to HANA-based systems has made it possible to conduct transactional and operational data reporting directly within ERP systems, bringing real-time data closer to business decisions. To fully leverage the power of SAP HANA’s in-memory database, SAP introduced a groundbreaking innovation: Core Data Services (CDS).

CDS is more than just a framework; it allows users to define and consume semantically rich Virtual Data Models (VDMs). By adopting a Code-to-Data approach, CDS pushes most computations down to the SAP HANA database, reducing execution time and significantly improving performance. Unlike traditional ABAP DDIC tools, ABAP CDS view offer advanced capabilities for building comprehensive VDMs, paving the way for faster, smarter analytics.

Learn More – SAP Analytics Cloud: Overview of Data Models

What is a Virtual Data Model?

In SAP S/4HANA and SAP S/4HANA Cloud, VDMs form the backbone of all analytical applications. These CDS views follow specific modeling rules, providing a consistent and ready-to-consume data layer for analytics tools such as Embedded Analytics, Fiori, SAP Analytics Cloud (SAC), Lumira, and BusinessObjects.

abap cds view

Figure: 1 Embedded Analytics High Level Architecture

 

Types of CDS view for S/4HANA Embedded Analytics:

Basic CDS View:

Basic CDS views are designed to expose the Master Data like Customer Master, Material Master, Business Partner, Company Code etc. Basic CDS view consume physical SAP tables to read data from.  It is also called as INTERFACE CDS views and for naming standards SAP use ‘I’ in between of the view name : *_I_*.

Annotations:

@VDM: {ViewType : #BASIC }

@Analytics.DataCategory: #DIMENSION

Composite CDS View:

Composite CDS views are configures as an Association of Master data OR Master data and Transactional data. It act like a CUBE of traditional SAP BW system. They can consume Basic Views or other Composite views to read data from. It is mandatory to define at least one measures in the CDS view of type CUBE. SAP use ‘CO’ in between of the view name: *_CO_* as a standard naming convention

Annotations:

@VDM: {ViewType : #COMPOSITE }

@Analytics.DataCategory: #CUBE

Consumption CDS View:

This is the last layer of CDS analytical Model.  These are the final views ready for consumption by the UI tools – Bex, Lumira, Webi, Analysis for Office, Fiori Tile etc. and accessed by business users in the form of a report.  These views can consume all other Basic or Composite Views to read data and create a final data set to be fed into the UI tools for reporting requirements. SAP provided Standard consumption CDS view starts with:  C_*.

Annotations:

@VDM: {ViewType : #CONSUMPTION }

@Analytics.Query:True

@Odata.Publish:True // To expose as Odata for consumption in Fiori Tile.

Additional field level annotations are also required to get query like structure in RSRT.

Learn More – A Guide to ADSO Functions in SAP BW4HANA

Private CDS View:

These views are private to SAP and must not be Used or Created by anyone other than SAP.  SAP can change the configuration of the private CDS view without any notice.  For naming standards, SAP start the view name with  P_*

The following diagram will summarize embedded analytics data models.

Data Analytics Model

 

Key Advantages of ABAP CDS Views

  • Simplified Data Modeling: ABAP CDS offers a logical and structured way to model complex data structures, making data more accessible and actionable.
  • Improved Performance: By executing complex queries directly on the HANA database, CDS views optimize performance through code pushdown.
  • Reusability: The modular design of ABAP CDS allows developers to reuse views across different projects, streamlining the development process.
  • Cross-System Integration: CDS views seamlessly integrate with Fiori, SAC, and SAP Datasphere, enabling businesses to visualize and analyze data across various SAP systems.

Conclusion

ABAP CDS views for S/4HANA Embedded Analytics offer a powerful, flexible solution for businesses aiming to enhance their operational data reporting and analytics capabilities. By harnessing the full potential of SAP HANA’s in-memory database, organizations can experience faster, more efficient reporting and deeper insights, leading to better decision-making.

Looking to optimize your SAP environment with ABAP CDS views? Contact Stridely Solutions today and unlock the full potential of your embedded analytics capabilities.

Inquiry

FooterContact || Quick Enquiry