With SAP’s Core Data Services (CDS) Views, developers can create, maintain, and reuse custom data models to meet their specific needs. In this guide, we will dive into the supported capabilities and modeling patterns of CDS Views, exploring how you can master the CDS views to unlock its full potential. From optimizing data management to improving data analysis, this guide will provide you with the knowledge and skills you need to succeed with SAP’s CDS Views.
Table of Contents
SAP S/4HANA CDS Views
SAP S/4HANA’s virtual data model (VDM) is the foundation on which analytical apps and APIs (application programming interfaces) can access business data(often found in database tables) following consistent modeling. CDS views represent SAP S/4HANA Cloud and SAP S/4HANA VDM.
There are a wide variety of uses for CDS views, including developing Fiori apps and conducting data analysis. Your own unique CDS views can be made for such cases and these CDS views are derived from a huge pool of publicly released CDS views. It is often developers face difficulties to identifying the right CDS view for a given scenario or business requirement.
From S/4HANA 2020 SAP has added two new annotation features for CDS views—supported capabilities and modeling pattern—to aid in determining which CDS view to utilize in any given scenario.
Supported Capabilities for CDS Views
It is possible for a single CDS view to provide many capabilities such as a data source, association target, or analytical provider. Supported Capabilities indicates clear use cases for CDS views and provides an idea of the most efficient ways to use a CDS view.
The supported capabilities of a CDS view are defined using annotation and can be attached to any given CDS view. Each CDS view can have multiple supported capabilities. The annotation has the following syntax:
@ObjectModel.supportedCapabilities: [… , …]
The table below list the all supported capabilities annotation values that are currently available for CDS views:
Annotation Technical Name | End-User Description |
---|---|
SQL_DATA_SOURCE | Data Source in SQL Select |
CDS_MODELING_DATA_SOURCE | Data Source for Defining CDS Entities |
CDS_MODELING_ASSOCIATION_TARGET | Association Target for Defining CDS Entities |
DATA_STRUCTURE | Data Structure |
LANGUAGE_DEPENDENT_TEXT | Language-Dependent Text |
VALUE_HELP_PROVIDER | Data Provider for Value Help |
EXTRACTION_DATA_SOURCE | Data Source for Data Extraction |
DERIVATION_FUNCTION | Derivation Function for Default Values |
PARENT_CHILD_HIERARCHY_NODE_PROVIDER | Data Provider for Hierarchy Information |
SEARCHABLE_ENTITY | Data Source for Search |
ANALYTICAL_QUERY | Analytical Query |
ANALYTICAL_DIMENSION | Analytical Dimension |
ANALYTICAL_PROVIDER | Data Provider for Analytical Queries |
ANALYTICAL_PARENT_CHILD_HIERARCHY_NODE | Data Source for Hierarchies in Analytics |
OUTPUT_FORM_DATA_PROVIDER | Output: Form Data Provider |
OUTPUT_EMAIL_DATA_PROVIDER | Output: Email Data Provider |
OUTPUT_PARAMETER_DETERMINATION_DATA_SOURCE | Output: Parameter Determination |
SITUATION_ANCHOR | Situation Handling: Anchor Object |
SITUATION_TRIGGER | Situation Handling: Trigger Object |
SITUATION_DATACONTEXT | Situation Handling: Data Context |
Modeling Patterns for CDS Views
A modeling pattern describes the main intention of a CDS view. The modeling patterns of a CDS view are defined using annotation and can be attached to any given CDS view. Each CDS view can only have one modeling pattern.
The annotation has the following syntax:
@ObjectModel.modelingPattern: ...
The table below list the all modeling patterns annotation values that are currently available for CDS views:
DATA_STRUCTURE | Data Structure |
LANGUAGE_DEPENDENT_TEXT | Language-Dependent Text |
VALUE_HELP_PROVIDER | Data Provider for Value Help |
DERIVATION_FUNCTION | Derivation Function for Default Values |
PARENT_CHILD_HIERARCHY_NODE_PROVIDER | Data Provider for Hierarchy Information |
ANALYTICAL_QUERY | Analytical Query |
ANALYTICAL_CUBE | Analytical Cube |
ANALYTICAL_DIMENSION | Analytical Dimension |
ANALYTICAL_PARENT_CHILD_HIERARCHY_NODE | Data Source for Hierarchies in Analytics |
OUTPUT_FORM_DATA_PROVIDER | Output: Form Data Provider |
OUTPUT_EMAIL_DATA_PROVIDER | Output: Email Data Provider |
OUTPUT_PARAMETER_DETERMINATION_DATA_SOURCE | Output: Parameter Determination |
SITUATION_ANCHOR | Situation Handling: Anchor Object |
SITUATION_TRIGGER | Situation Handling: Trigger Object |
SITUATION_DATACONTEXT | Situation Handling: Data Context |
NONE | None |
You can view the supported capabilities and modeling patterns of CDS views in the View Browser app. In the ABAP Development Tools, the information is available in an annotation at header level of a CDS view.
Summary
The introduction of supported capabilities and modeling pattern doesn’t have an effect on existing custom implementations of CDS views. However, it might make sense to look for different CDS views that are more appropriate for your implementations if you realize that their current use doesn’t fit the supported capabilities or modeling patterns.
Good post. I learn something totally new and challenging on blogs I stumbleupon on a daily basis. Its always useful to read content from other authors and practice something from their websites.
I am not sure where you’re getting your info, but great topic.
I needs to spend some time learning much more or understanding
more. Thanks for wonderful information I
was looking for this info for my mission.