Skip to Content
Technical Articles

CDS based data extraction – Part I Overview

Anyone interested in the state of the art extracting data in the SAP universe and beyond? This blog (series) is meant to provide a comprehensive overview of the topic, highlight the main features but also make sure you understand the meaning and implication of all available annotations related to the topic. I am aware of the fact that various documents/blogs have been published on the topic already, but for sake of completeness I will repeat parts here which you might already know.

I will update this blog series upon new developments, changes etc., so you will always get the latest news.

Quickly jump to

Part 2 (delta handling) here

Part 3 (misc topics like hierarchy extraction, testing and FAQ) here

Let’s get started…

While this blog post is focused on the Core Data Services (CDS) flavor based extraction from SAP S/4HANA Cloud Edition (CE) to SAP BW and SAP BW/4HANA please, be aware that the examples explained here are meant to be seen in a wider scope, finally provisioning all SAP solutions, may it be cloud or on-premise, with data warehouse grade extraction capabilities. This is happening in the context of the SAP Cloud Data Integration (CDI)

 

Possible Sources (aka Data providers):

  • SAP S/4HANA (CE/OP)
  • SAP Success Factors
  • SAP C/4HANA
  • SAP Ariba
  • SAP Field Glass
  • ….

Possible Targets (aka Data consumers):

  • SAP Analytics Cloud
  • SAP BW/4HANA, SAP BW
  • SAP Data Intelligence (fka SAP Data Hub)
  • SAP Data Warehouse Cloud

Here we go…

If you are familiar with an SAP S/4HANA system you surely will have come across CDS views as part of the Virtual Data Model (VDM), may it be in the context of operational analytics, (planning) transactions or other. To harnish the power of SAP HANA under the SAP S/4HANA, SAP has introduced CDS modeling and has spent a great deal of effort into creating CDS data models on top of all applications consistently reflecting and exposing all entities.

Why not use this as a base for data extraction, similarly to the way in which extractors have worked before?

Some time ago SAP has released CDS view annotations which enable you to use a CDS view as an extractor aka DataSource on BW side.
You can find them in the @Analytics section in the SAP help documentation. Starting with SAP S/4HANA CE1905, SAP has started rolling out extraction enabled standard CDS views and has been extending the coverage since.

In an SAP S/4HANA system CDS based extraction is handled by the Operational Data Provisioning (ODP) framework, the context is called ODP – ABAP CDS Views  (ODP_CDS). More info on ODP can be found in Rudolf Henneckes blog

On BW side your source system will need to be connected in context ABAP CDS Views (ODP_CDS).

Below you can see the architecture in detail

Availability

The enablement of ABAP CDS views for extraction has been available since SAP S/4HANA OP1808

Technically speaking this requires…
on provider side:

  • SAP S/4HANA (with integrated software component SAP BW 7.50 >= SP5)
  • SAP BW/4HANA 1.0 >= SP01 (loading from a “BW” to a “BW” sytem)
  • SAP BW 7.50 >= SP5 (loading from a “BW” to a “BW” sytem)

on consumer side (using the ODP Source System with Context ODP_CDS)

  • SAP BW > 7.3x
  • SAP BW/4HANA 1.0 >= SP00

You can find more info on the availability in SAP note 2481315.

 

A CDS view can be enabled for data extraction by just adding the following annotation
@Analytics.dataExtraction.enabled
or
@Analytics.dataExtraction.enabled : true
After adding this annotation, the CDS view is available for extraction by the ODP framework and visible for its data consumers.

System set up and Authorizations

Well one step back, it will not be visible by default for the data consumers. You first will have to have the proper authorizations in place for the communication arrangement / remote user.

SAP S/4HANA CE
In case of an SAP S/4HANA CE system, this comes out of the box when setting up the communication arrangement ( SAP_COM_0042) for the source system connection as described here -> Details -> Set-up instructions.

SAP S/4HANA OP
In case of an SAP S/4HANA OP system, please follow the instructions as described in SAP note 2716363 for your remote connection user (“ALEREMOTE” if you will). For the big picture concerning ODP authorizations, please have a look at note 2855052 as well. One side note regarding the authorizations for the remote connection user. The standard CDS views, enabled for extraction, that SAP delivers are bound to stability contract Contract for system-internal use (C1). You can find out more on the stability contracts for CDS views in the SAP help documentation here.

You need to make sure to set the authorizations for the connection user accordingly to only have these “C1 released”-CDS views displayed and be used as DataSources.

For customer created CDS views the authorizations need to be maintained in a similar way. It is highly recommended

  • to apply naming conventions for custom CDS views
  • to work with the API release state for these CDS views as described here

This way you will be able to only expose the CDS views to consumers that are meant for extraction.

SAP Data Intelligence (fka SAP Data Hub)
As depicted in the architecture above leveraging SAP Data Intelligence as a consuming client is possible as well. For details please have a look at the detailed blog on this scenario by my colleague Phillip Parkinson: Part 1 on the setup and Part 2 on the CDS view consumption.

 

Classification of CDS views

Furthermore you are encouraged to classify your CDS view, i.e. are we talking about transactional data, attributes, texts, or hierarchies? This will also help the consuming applications to correctly use the view.

Either by

specifying a value for
@Analytics.dataCategory

  • #FACT for transaction data
  • #DIMENSION for master data attributes
  • #CUBE (only to be used in exceptional cases)

or specifiying a value for
@ObjectModel.dataCategory

  • #TEXT for text views
  • #HIERARCHY for hierarchy views

 

With these steps in place you have a first easy extraction enabled CDS view, in full mode.

In full mode, all available data is extracted in one data extraction run. For potentially smaller data volumes (~ < 1,000,000 data records) without any complex logic and load time considerations, a full extraction can cover the most straightforward cases.

Apart from the number of records, the breadth of the CDS view needs to be taken into consideration as well, as both factors will determine load volume and duration. Full extraction can mostly be applied for master data and text loads. For the update mode full extraction, no further annotations need to be assigned to the CDS view.

Please note that CDS views with (input) parameters only support full extraction.

After that you will be able to find this CDS view on SAP BW side, i.e. create a DataSource. Please note that you will need to search for the technical SQL view name (@AbapCatalog.sqlViewName) of the CDS view, not the CDS view name.

So in case of the CDS view for Sales Organization, you will need to search for CSDSALESORGDX and not for C_SalesOrganizationDEX.

CDS View in source system:

 

Data Source view on SAP BW(/4HANA) side:

Right-click on your ODP_CDS source system in the SAP BW modeling tools. In case you do not see the New -> DataSource option please make sure you have the latest version of the BW Modeling tools installed .

 

Choose next

Choose option Proposal from Operational Data Provider

Search for the sqlViewName of your CDS view

Provide an application component and a Description. The DataSource Type is derived from the @Analytics.dataCategory/@ObjectModel.dataCategory defined in the CDS view.

Voilá, there is your DataSource.

Let me guess your next question: “What about delta handling?”  As you could already spot in the architecture overview, there is inbuilt delta handling support, namely:

  • Delta based on Date/Timestamp
  • Delta based on Change Data Capture (CDC)

To be able to cover all the details about delta handling in a digestible manner, I have put the delta topic into a separate blog post.

11 Comments
You must be Logged on to comment or reply to a post.
  • Thanks Simon Kranig for this wonderful information. I have one doubt:

    In the availability section, it is mentioned

    “on provider side:

    • SAP BW 7.50 >= SP5
    • SAP BW/4HANA 1.0 >= SP01″

    So does the provider system also need to have BW or BW/4HANA stack?

    Regards,

    Sumit

    • Hi Sumit,

      yes this is right, SAP BW (SAP_BW) as integrated software component of an SAP S/4HANA system as being the main use case.

      Or extracting from SAP BW and/or SAPBW/4HANA in case of a stand-alone “hub/data provider system”.

      regards,

      Simon

  • Many thanks for the effort. CDS extraction is cool and consistent from a conceptual point of view. The fun starts with CDS based hierarchy extractors and the detection of deleted records. Looking forward to the next chapter. Kind regards.

  • Does this scenario apply for customers running Suite on HANA (ECC 6.0 EHP8, Netweaver 7.50) with BW 7.5 on HANA. I understand that there may not be any delivered CDS views, but can the customer use the technology for custom developed tables and CDS views.

     

    • Hi Vineet,

      as far as I know the SAP_BW component as part of ECC 6.0 EHP8 would be high enough to allow for at least basic extraction, but no guarantees.

      best regards,

      Simon

      • Just wanted to confirm that we have successfully created ABAP CDS based extractors and subsequently data sources in BW on HANA based on these extractors in our landscape. We are able to create Open ODS views for real-time reporting as well as load data using the scenario described.

        Thanks

         

        Vineet

  • Hello Simon,

    It was a good content….But there is one scenario which i am facing currently.

    My Data flow…

    CDS view–> ODP-CDS Data source–> Open ODS view–> Composite provider–> BW query

     

    Now, User want to pass a characteristic value in to BW query variable and want to restrict data from CDS view(Source system side)…

    Is that possible through input parameter ..? because i am able to implement the data flow with input parameter till Open ODS view. but then…for composite provider its not working… and throwing error.

     

     

     

  • Hi Simon,

    in my case we are on S/4 HANA on premise (1610).

    Embedded BW (Client 200) is activated and we want to consume an ABAP CDS View (from source Client 100) through open ODS View in eBW.

    So our virtual data flow is:

    Client 100: DDL CDS View (with business logic) which is restricted by DCL CDS-View (for data access control) in source Client 100 ->
    Client 200: ODP-CDS DataSource  -> open ODS View -> CompositeProvider -> eBW query

    DataFlow works fine. Pushing filter values from eBW-Query to CDS-View (Database client 100) also works.
    Even authorizations looks very good -> This means User will see only data respective of his PFCG-Authorizations in Client 100…this is a big
    advantage because you don’t need to create “Analysis Authorizations” (RSECADMIN) in eBW.

    Problem: Exactly same data flow we have implemented on a S/4 HANA on premise (1909),
    but authorization doesn’t work. Result of query is always all of data…it ignores the restriction in DCL CDS-View

    Any idea what’s wrong here?

    Best regards
    Erol