Technology Blog Posts by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
SimonKranig
Product and Topic Expert
Product and Topic Expert
177,312
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 Marketing Cloud

  • SAP Fieldglass

  • ....


Possible Targets (aka Data consumers):

  • SAP Analytics Cloud

  • SAP BW/4HANA, SAP BW

  • SAP Data Intelligence (fka SAP Data Hub)

  • SAP Datasphere

  • ...


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


Extraction Architecture



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 ODP availability in SAP note 2481315.

One last sidetracking before we start to get into the details:
"How can I find out, which CDS views are available for data extraction?" As I heard this question more than once and the answer had been well hidden in part III of this blog series, I will add it here as well.
Starting from SAP S/4HANA 2020 and SAP S/4HANA Cloud Edition you can use the CDS view I_DataExtractionEnabledView to identify CDS views available for data extraction.

Let's dive into the details now.
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.

Please note: contrary to the SAP S/4HANA OP edition, in SAP S/4HANA CE you are (for now) only able to consume CDS views enabled for extraction by SAP and are not able to create custom CDS views enabled for extraction or extraction enable SAP delivered CDS views. In case you are missing a particular view that you need to have enabled for extraction, please make use of the SAP S/4HANA Cloud for CDS View Extraction Enablement campaign.

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 pparkinson: 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.

(Update October 2022): With the advent of CDS view entities some time ago already with all new shiny features, please be aware that CDS view entities do not need to carry the @AbapCatalog.sqlViewName anymore.

Hence in case of a CDS view entity the name to search for will be the CDS Entity name itself. For classic CDS views it will be the @AbapCatalog.sqlViewName.

One exception to this: in case of a CDS view being migrated from classic to view entity, the view entity will carry a @AbapCatalog.technicalName as replacement for @AbapCatalog.sqlViewName to ensure that the subscribers/consumers are not disrupted by the change when it comes to data extraction. .

 

In case of the classic 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.
37 Comments
SumitKundu
Active Participant
0 Kudos

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

Phil_from_Madrid
Participant
0 Kudos
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.
SimonKranig
Product and Topic Expert
Product and Topic Expert
0 Kudos
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
vineet_gupta3
Participant
0 Kudos
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.

 
SimonKranig
Product and Topic Expert
Product and Topic Expert
0 Kudos
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
vineet_gupta3
Participant
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
SimonKranig
Product and Topic Expert
Product and Topic Expert
0 Kudos
Glad to hear that, thanks a lot for sharing Vineet.

best regards,

Simon
0 Kudos
Hi Simon,

Thanks for the information. Is it possible to use CDS views to extract data from ERP systems?

Best,

Samin
SimonKranig
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Samin,

please check my answet to Vineet above. would need to be ECC on HANA.

best regards, Simon
0 Kudos
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.

 

 

 
isathore
Product and Topic Expert
Product and Topic Expert
Hi Simon,

How shall a customer enable custom CDS view to be available for extraction in Cloud. In the Custom CDS app, there is no way to set this up. Any idea?

Best Regards

Isabelle
regysm21
Active Participant
Hi Simon,

 

thank you very much for the detailed information. Perhaps it was not clear for me to understand from above, but is there a way to connect S/4HANA Cloud, SAP Marekting Cloud, SAP Service Cloud, SAP Sales Cloud to SAP BW on HANA 7.5, not BW4HANA?

 

Thanks,

Regys
0 Kudos
Hello Simon,

Thank you or such an informative blog.

Can we send the data to third party cloud system via this CDS based data extraction , if so what are the Prerequisite for both system .

 

Thanks in Advance.

 
SimonKranig
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Saroj,

generally, yes you can (leveraging a tool that is able to consume the CDS views and able to write it into your target system). You can check the blogs by Philip which I have link in the blog above who basically shows the consumption part using SAP Data Intelligence.

best regards,

Simon

 
0 Kudos
Hello Simon,

 

Earlier in ECC extractors we used to write customer exit code for getting appended fields. with ABAP CDS View extractors, where and how to write those custom code and append structure code.

 

Regards,

 
former_member563260
Participant
0 Kudos
Hello Simon,
Can you let me know how Ariba can be used as a Data provider?

Regards,
Abdullah
SimonKranig
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Biren,

this follows the same logic as described in this blog.

regards,

Simon
lakshminarasimhan_n4
Active Contributor
0 Kudos

Thanks I tried the same and it worked in real time. 

jadhvaryu1065
Explorer
0 Kudos
Hi Simon,

We are evaluating good data extraction from NW based ECC6 to SAP BW and non-SAP system. And looking at ODP and ABAP CDS.

It seems ODP does NOT support non-SAP target systems. While I am not finding a clear statement if full featured ABAP CDS is also available in ECC6 on NW.

Could you clarify on both ODP & ABAP CDS?

Thanks!

AJ
henry_jones
Participant
0 Kudos
Hi Simon,

Great information!

I'm late to the game on this... Are source system is S4HANA 2021 FP0 and our target system is a separate BW7.5 (non-HANA!) system. Does this approach still work. Can you point me in another direction if necessary?

 

Thanks
SimonKranig
Product and Topic Expert
Product and Topic Expert
Hi Henry,

you can check this info in the section Availability in the blog (note 2481315).

best regards,

Simon
henry_jones
Participant
0 Kudos
Thanks! I got it working thanks to your blog!!!! 🙂
henry_jones
Participant
0 Kudos
Hi again. Can you offer any guidance on how to enhance the ODP?
0 Kudos

Hi Simon,

Its very good and informative blog.

In case of direct data extraction, if data exceeds more than one billion, will it support data extraction?

1.We need to add any logic in the CDS view to achieve huge data extraction ?

2. Is there any provision to access data in batch wise in case of full data extraction?

Thanks in advance,

Best Regards,

Vivek

JaySchwendemann
Active Contributor
0 Kudos
Hi Simon,

we are planning something similar with an Fiori Frontend Server Hub System as a data provider (NW 7.52 SAP_BASIS SP 9 / SAP_BW 7.52 9) but on AnyDB. Is HANA really necessary from a technical POV or is it just that real time capabilities will not fly due to not fitting performance of an AnyDB system?

Many thanks and kind regards

Jens
jyoti_senapati
Participant
0 Kudos
Hi Simon,

 

How to use CDS extractor for Delta loading from Source side. ?

 

Regards,

Jyoti
chrwittm
Product and Topic Expert
Product and Topic Expert
chrwittm
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Simon,

Thanks for the great blog post!

I have a quick question on the release contract: Does an extraction-enabled CDS-view require a release contract? (In the section "System set up and Authorizations" the link regarding release contracts is broken)

Thanks and best regards

Christian
SimonKranig
Product and Topic Expert
Product and Topic Expert
Hi Christian,

thank for you for letting me know, I have adjusted the link. Regarding your question please have a look at the two notes mentioned in the section.

best regards,

Simon
dkle
Participant
0 Kudos

Hi Simon,

is it true that there has to be BOTH annotation @Analytics.dataExtraction.enabled AND @Analytics.dataCategory present in the CDS View?

E.g. in view C_AccrEngineAccrAssgmtDEX only the first one is present, and I cannot see/replicate it from BW4 side.

Thanks and Regards

Daniel

0 Kudos
Hi Simon,

Thanks for the blog post!

We tried to use the CDS based data extract with an access control on an authorization object (in our case F_BKPF_BUK - on company code). We respected all the recommendations for the code and user authorizations (including the recommendation note 3211519 - ODP CDS View extraction authorization information):

SAP system S/4HANA 2020 (OP)

When we test our extraction for the initial load or delta without Odata query filters the authorization control does not work (with a user being authorized for only 1 company code the results XML contains the values for all the company codes).

Any idea why access control doesn't work ?

Thanks

Mazlum

 
Loed
Active Contributor
0 Kudos

Hi simon.kranig

What's the possible reason why the APPLICATION COMPONENT is grayed out?

https://answers.sap.com/questions/13797037/move-datasource-to-another-application-component-i.html

Would you also know how to move a datasource from NODESNOTCONNCETED to another application component?

OR

How can I create a custom application component?

Thanks.

Loed

saroop1988
Explorer
0 Kudos
Hi Simon,

Very informative blog. We have connected S/4HANA OP and Data Sphere. We are trying to build data flow using ZCDS* views and when we try to do a data preview it says data preview not available for this connection. As per below document it says, if this is true how can we do a data preview.

  • The data preview in the data flow editor of the Data Builder is not available for ABAP sources.


https://help.sap.com/docs/SAP_DATASPHERE/be5967d099974c69b77f4549425ca4c0/a49a1e3cc50f4af89711d8306b...

Thanks,

Saroop Reddy
AndreasTenholte
Product and Topic Expert
Product and Topic Expert
4th anniversary of this blog post and therefore time for a celebration comment, a very simple but deep:

"Danke Simon!!!"
AleGuarneri
Explorer
0 Kudos

Very nice blog!

Quick question: do you think it's possible to leverage the same architecture for custom CDS views created on the ABAP Cloud Env. (aka Steampunk)?

Thanks

Alex

deepti_neema
Explorer
0 Kudos

Hi,

Thanks for this detailed blog. I am getting warning message :Data extraction for CDS Entity XXXXX not possible [Analytics]. Is there is any prerequisite to enable this option. 

Any pointers will be greatly appreciated. 

Regards,

Deepti

rammel
Participant
0 Kudos

Hi,

Where is this annotation supported?

Analytics.dataExtraction.enabled

I tried creating custom CDS views under  'ABAP for Cloud Development' package in BTP ABAP/S4H 2022 OP/S4H 2023 (Private Cloud) and in all of these systems, I keep getting an error that the annotation usage is not permitted/supported.

Are we only allowed to use these annotations if we create our custom CDS views under a 'Standard Package' (Tier 3)?

I did that too but now I am getting a different warning message.

rammel_1-1734973006289.png

I'm not sure if I'm missing something.