Introduction
This blog will explain the details of accessing the CDS views from S/4HANA On-Premise in SAP Datasphere with semantics. This feature helps accessing the data from ERP system with business context and logic intact through CDS views.
Prerequisite
SAP S/4 HANA version should be 2021, or newer with SAP_BASIS Release 756 or newer. The below note has all the prerequisites in detail
To access the CDS Views with semantics, create a connection in SAP Datasphere of type "SAP S/4HANA On-Premise" to the source S/4HANA system. It will require DP Agent and Live Tunnel connection to access all the features.
Live tunnel connection can be created in Datasphere from System -> Configuration, under Data Integration "Live Data Connections (Tunnel)". It requires HTTPS resource type to be exposed in the cloud connector
Overview
We can use Import Entities wizard to import semantically-rich objects from SAP S/4HANA on-premise connections. This will create Business Builder and Data Builder entities in SAP Datasphere automatically.
There are different ways available to import
1. From Data Builder.
2. From Semantic Onboarding, choose the connection type
3. From Repository explorer
Select your connection type, Target Datasphere space, connection name with Data Access options and entity to import. Data Access has 2 options "Replication Flow to Local Tables" and "Remote Tables".
For Remote Table option, It will create the objects only for specified entity and business builder objects depending on the option you choose without any associated objects.
In source S/4HANA, ESH_CSN_CDS_TO_CSN program in SE38 has to be executed for the CDS view to generate the CSN which will be used for this option. This report ESH_CSN_CDS_TO_CSN can be executed with CDS view name as filter or without any filter to generate for all entities in the system(execute in background).
For Replication Flow to Local Tables option, It uses different service CSN_EXPOSURE_V4, all the details are available in the below SAP Note. Search for CSN service in particular to look for relevant sections only for this option.
Metadata Import via "CSN Exposure" Service
This option seems very interesting and will create all the associations as local tables from the underlying CDS view. This will also create replication flow to load data from CDS view into Datasphere local tables. CDS views has to be data extraction enabled to extract the data with annotation @analytics:{dataExtraction: {enabled: true}} for full extract and CDC annotation delta.changeDataCapture for delta.
Automatically Generated Objects:
Local table generated corresponding to a CDS View with Associations Exposed:
Replication Flow:
Conclusion:
This feature is very powerful enabling the modelling with semantically-rich objects and keeping the business context from S/4HANA ERP system. It will also reduce the development effort by using the logic from standard CDS views. The exposed associations can be used at run-time to fetch the text and navigational attributes whenever required. Replication flow option once data is replicated will improve the performance.
No comments:
Post a Comment