cancel
Showing results for 
Search instead for 
Did you mean: 

Extraction of CDS Views from s4hana system to Datasphere

Likhitha
Newcomer
733

Extraction of CDS Views from S4hana system to Datasphere

CDS Views Introduction

The CDS (Core Data Services) View is a crucial component for data modeling and reporting in the SAP S/4HANA system. Here is a brief synopsis of the CDS View:

Concept
:

 Within the SAP S/4HANA system, the CDS View data abstraction layer offers a uniform and semantically rich representation of data from several sources. It frees consumers from having to comprehend the underlying technical intricacies in order to access and evaluate data.
Data Integration:

 The CDS View combines information from a variety of sources, such as external data sources, custom-developed apps, and SAP standard applications. Users will find it easier to obtain the information they require thanks to this integration, which guarantees a thorough and unified view of the data.
Data Modelling:

You can specify the structure, relationships, and properties of the data by creating data models using the CDS View. You can customize these models to meet the unique requirements of your company, giving you the ability to access and analyze data in a manner that best suits your needs.


Data Query and Reporting:

The CDS View offers an easy-to-use interface for data querying and reporting. Without requiring in-depth technical knowledge or programming abilities, users can develop bespoke reports, dashboards, and analytics.

This documents gives the detailed information about extracting the CDS views from S4hana system to Datashpere.

Below is the high-level steps to extract CDS views from S4hana system to Datasphere

Likhitha_0-1722346607510.png

In order to pull the CDS views from eclipse, open Datasphere, from the side navigation choose Data builder> select the space in which we wanted to create the views and Analytical Model

Likhitha_1-1722346607529.png

  • Then click on the new graphical view

Likhitha_2-1722346607546.png

 

Choose Sources   > Connections > NEW DE4(S4hanasystem connection) >Extractors > ABAP_CDS

Likhitha_3-1722346607578.png

 

 We could able to see the CDS views through their SQL View names, which are in eclipse

Then open eclipse,

Choose the cds which we wanted to extract into the Datasphere,

  • Point to remembered: The cds view must contain the below annotation, CDS views with these annotations only will be extracted in the Datasphere

@analytics.dataCategory: #DIMENSION

@Metadata.allowExtensions: true

@analytics.dataExtraction.enabled: true

 In eclipse, we have the CDS view

Likhitha_4-1722346607605.png

 Now as shown in the above image, we can see the sql view name

With the same sql view name, we can see it in the datasphere

Likhitha_5-1722346607659.png

 

Now we can drag the CDS and create the view

Likhitha_6-1722346607674.png

 

  • Select Semantic Usage us FACT and enable the options for Expose for Consumption and Run in analytical Model

As we have chosen the semantic usage as Fact, we need to select Measures

Then save and Deploy

  • In order to create the Analytical Model, we need a fact table and dimension tables, below is the procedure to create dimension table

 Follow the above steps to pull the CDS into the view, but the Semantic Usage should be selected as Dimension

 

Likhitha_7-1722346607698.png

Select a key field which should match with the Fact table key

Here we are selecting the sales document as key in both Fact table (Sales document) and the Dimension table(ITEMBASIC_SDI)

Likhitha_8-1722346607727.png

 

 Then in the Salesdocument table, click on association “+” then select the target dimension table

Likhitha_9-1722346607752.png

 Then we need to map the key fields from both the tables

Likhitha_10-1722346607771.png

 

We have mapped the key field Sales Document from both the tables

Similarly, we need to take any number of dimension tables where we can map only the key fields in target mapping

 In this case I have chosen division, sales organization as two keys in two different dimension tables

And then mapped in the association of the fact table as shown

Likhitha_11-1722346607789.png

 

 

Likhitha_12-1722346607816.png

 

 

Above images clearly tells us the mapping fields of the dimension table

Likhitha_13-1722346607834.png

 

 

After the creation of views, we need to extract the view created into the Analytical Model

For that, as above open the data builder screen and choose New Analytical Model,

Likhitha_14-1722346607854.png

 

After moving into Analytical Model screen, in the repository tab we can see the previously created view, drag the view, you will be displayed with the below screen

Likhitha_15-1722346607866.png

 

  • Choose all the Associated Dimensions and click select

Likhitha_16-1722346607880.png

 

 

 So this is the analytical model, which is associated with the Three dimensions

NOTE: We need to map all the key fields from the Associate dimension table to the fact table

  • Then we need to pull the Analytical Model created into SAP Analytical Cloud(SAC)
  • Open SAC click stories > choose responsive > select optimized design experience >
  • In the insert tab choose chart, then we can see the below screen
  • Choose Datasphere connection here and the space in which views and analytical model is created

Likhitha_17-1722346607887.png

 

  • Choose the Analytical Model and thereby we can create the dashboard

Likhitha_18-1722346607898.png

  • By Choosing the best visualization, create a dashboard

Likhitha_19-1722346607990.png

Jerry_Lowery
Product and Topic Expert
Product and Topic Expert
0 Kudos
Thx!
0 Kudos
Thanks for sharing detail info, It's very useful!
View Entire Topic
Jerry_Lowery
Product and Topic Expert
Product and Topic Expert
0 Kudos

Great Info thanks for sharing.