Extracting Data from SAP S/4HANA on Premise or Cloud
The new SAP standard method for extraction of data from SAP S/4HANA to SAP BW/4HANA is based on the SAP ABAP Core Data Services (CDS) technology. This replaces the S-API technology.
The first CDS-based DataSources were shipped with the SAP S/4HANA 1809 on-premise release.
SAP S/4HANA Cloud leverages a HTTP/SOAP-based connection instead of an RFC-based connection to SAP BW/4HANA. For this reason, ODP_SAP is not available for this scenario and ODP_CDS is the general strategic core interface for SAP BW/4HANA extraction from SAP S/4HANA Cloud. The technical framework and connectivity (HTTP / SOAP based) between SAP BW/4HANA and S/4HANA Cloud (the so-called communication scenario) is available with S/4HANA Cloud 1808. A first wave of ABAP CDS Content for extraction and the first version of key user tools for extensibility with S/4HANA Cloud exists since the 1811 release. Starting with SAP S/4HANA Cloud 1905, SAP has started rolling out extraction of enabled standard CDS views and has been extending the coverage since.
ABAP CDS Views as ODP Providers (Context ODP_CDS)
The ODP context for ABAP CDS views (ABAP_CDS) provides the options to connect to SAP BW/4HANA via RFC or HTTP-based connection. SAP sources providing CDS extractors via the ODP Framework must have at least one of the following release levels: SAP NW 7.4 SP08, SAP NW 7.5 SP02, SAP BW/4HANA 1.0.
There are two characteristics to be defined by annotations to release a CDS entity for extraction:
- Type of CDS entity: There are two annotations available to define whether the objects represents transactional data, attributes, texts or hierarchies. Those are ANALYTICS.DATACATEGORY and OBJECTMODEL.DATACATEGORY.
- Type of Extraction: Annotation ANALYTICS.DATAEXTRACTION.ENABLED provides the required property and tells the system to generate a so-called operational data provider to enable modeling of ODP_CDS DataSources for SAP BW/4HANA. Additional annotations are available to specify a delta mechanism if required, unless only full extraction is supported.
The following annotations enable an ABAP CDS view for FULL extraction (and for virtual access via Open ODS View):
@Analytics.dataCategory(#DIMENSION, #FACT or #CUBE) OR @ObjectModel.dataCategory(#TEXT or #HIERARCHY) AND
@Analytics.dataExtraction.enabled
For DELTA extraction the following additional sets of annotations are available:
@Analytics.dataExtraction.delta.byElement.(…) for Date / Time Stamp-based Delta (available since SAP S/4HANA 2018)
@Analytics.DataExtraction.Delta.ChangeDataCapture.(…) for CDC-based Delta (available since SAP S/4HANA 2019)
Note
We have a more detailed look at scenarios using full and delta extraction later in this lesson.At runtime, a TransientProvider is generated for a each ABAP CDS View. A TransientProvider generates SAP BW/4HANA meta data from an ABAP CDS View so that it can be processed by SAP BW/4HANA.
The transaction RSRTS_ODP_DIS is used to display a TransientProvider preview for an Operational Data Provider.
This tool displays the meta data of the TransientProvider which is used at run time. Those CDS entities need to be specified as facts, master data, text or hierarchy in the corresponding Data Category annotation. You can check the meta data and preview the resulting data. Additionally, it is possible to receive an overview of all fields (characteristics and key figures) with all their properties. It is a helpful tool to analyze CDS views.
To retrieve the mapping of the SQL View name of the ABAP CDS View to the ABAP DDIC View you can use table RSODPABAPCDSVIEW.
Comparing Classic Extraction and CDS Extraction
Let's make a comparison between how customers worked with the classic ABAP function module based extractors that use the older S-API technology, and the new technology based on SAP ABAP Core Data Services.
As opposed to transaction RSA3 , which is not available to test CDS-based extractors, the report RODPS_REPL_TEST is used to test ODP replication.
Please consider the warning on top (Warning: Not Simulated): Initializing a delta and/or running a delta extraction with the report will trigger a real subscription in the ODQ frame work. This is not a dummy run.
The ODP Name is the @AbapCatalog.sqlViewName and is suffixed by the data category classification of the CDS entity the following way:
- $F for facts/transaction data
- $P for master data attributes
- $T for texts
- $H for hierarchies
- $E for other/without data category
CDS views use the Standard ODP Queue and related monitoring tools (ODQMON). If the delta is managed by CDC there is an additional CDC Monitor available (DHCDCMON).
Launch the next demo to explore an ABAP CDS View for extraction:
Note
For more details about the new CDS extractors in SAP S/4HANA refer to following blog post: