Technology Blogs 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.
Showing results for 
Search instead for 
Did you mean: 
Extracting mass data from an SAP S/4HANA Cloud, public edition tenant can have multiple use cases - One of the most common scenarios is to use the valuable records as part of a cross-application reporting based on heterogeneous data sources extracting records to a data warehouse or data lake solution and generate more insights on an organization’s processes.

There are multiple ways to access information and data records within a running SAP S/4HANA Cloud, public edition tenant – And not all of them are made for mass data extraction. We start this blog with a high-level technical description helpful to understand the basic data concepts in SAP S/4HANA Cloud, public edition. The main part will explain a feature released with 2302 for key users familiar with the Custom CDS View application: Create your custom CDS view enabled for mass data extraction.


Extraction enabled CDS Views - The base for mass data extraction from SAP S/4HANA Cloud, public edition

In the SAP S/4HANA Cloud, public edition a virtual data model (VDM) is used to reflect the data structure across all applications. Core Data Services Views (CDS Views) implement the VDM and these views build the base to access your data - especially to execute read operations. For further details, have a look at the already existing and helpful blogs:

In this blog, we will focus on mass data extraction. For side-by-side extensibility, have a look at this documentation.

Within the VDM, there are predefined CDS Views made for mass data extraction - These views have the annotation "@Analytics.dataExtraction.enabled"  set to true. As a data modeler in a data warehouse solution like SAP Datasphere or SAP BW/4HANA, you use these views as data source and base for your data models.

To set up an integration based on best practices, have a look at the documented integration scenarios to SAP Datasphere (Setup guide documented in SI 53L) or SAP BW/4HANA (Setup guide documented in SI 35D).

You ask yourself "What is the fastest way to find predelivered extraction enabled CDS views?" - Here are two solutions:

  • Open the API Business Hub and enable the filter "Data Source for Data Extraction"

  • In the role of a key user in SAP S/4HANA Cloud, public edition open the app "View Browser" and search for views with the annotation "Analytics.dataExtraction.enabled" set to true


The past: Challenge to use released CDS views for data extraction

As a key user or as a data modeler in a data warehouse solution you usually know a list of released CDS views, you want to use for a data model. But if the view was not extraction enabled by default, there was no chance to use this CDS view in an integration scenario with SAP Datasphere or SAP BW/4HANA.

As a consequence of this missing attribute, you as a customer had to follow the process of raising a feature request via the Customer Influence Portal, and wait for an upcoming release hoping your requested CDS view is marked as extraction enabled from now on. Depending on the project situation, this workflow can have a negative impact to a project .


The future: Data Extraction scenario within the CDS View App

Although we have solutions in place (e.g. raising a ticket via the Customer Influence portal), we understand the need of simplified extensibility and addressed this requirement by a new feature in a familiar and well-adopted app: From now on, you are able to create custom CDS views for data extraction by using the existing Custom CDS View app - simple & flexible.

The following four steps explain the straight-forward setup and underline the benefit of this feature in the context of an existing SAP Datasphere integration:

As key user, log in to your SAP S/4HANA Cloud, public edition instance, open the Custom CDS View app, provide a meaningful label, and select the scenario "Data Extraction".


To open the Custom CDS View app, the key user has to be assigned to a business role being part of business catalog “Extensibility - Custom CDS Views” (ID:SAP_CORE_BC_EXT_CCV).

The role “Analytics Specialist” (ID: SAP_BR_ANALYTICS_SPECIALIST) is one example.

In the next screen, you can define one or more sources and elements of your new extraction enabled custom CDS view - Flexible and based on your custom needs.

Keep the listed recommendations in mind while creating the CDS view - They will help to avoid issues while consuming the records provided through the custom CDS view.
After finishing the definition of your extraction enabled custom CDS view, you can search for the new view in the "View Browser" app - The new view will have the annotation "Analytics.dataExtraction.enabled" set to true ...
... and is therefore ready to be consumed by SAP Datasphere or by SAP BW/4HANA.

Watch a recorded demo of the mentioned steps above with more details presented as part of the Unbox SAP S/4HANA 2023 event here.

Guidelines for creating an extraction enabled custom CDS view

To ensure consistent and reliable on an extraction enabled custom CDS view, you should try to follow the listed guidelines:

  • As data source for a custom generated extraction enabled CDS view, your source view has to fit to the following criteria:

  • You can use multiple CDS views as data source, but keep in mind: The more complex your join conditions, the more effort to calculate the result set, and the higher the expected response time.

  • Always use the view preview within the Custom CDS View App to confirm the expected result set and check the performance.

  • You can expect a longer runtime in production environments as they have (usually) lager data sets. If the resulting performance is not sufficient, consider using separated views and perform the join on consumer side.

  • Think about the mandatory fields that you need for your target data model - Try to reduce the number of extracted fields / elements to a minimum.

  • The app will prevent joins of views not belonging to the same business area. – You are not able to join a view assigned to LoB "Sales" with a view assigned to LoB "HR".

  • In the latest version, we support full load of records only - No Change Data Capturing. Keep the expected number of records in mind while defining one or more data sources.

  • One custom CDS view is made for exactly one scenario – Example: You can not use the same custom CDS view for the scenario “External API” and “Data Extraction”, as every scenario covers a different use case: “External API” is intended for side-by-side Extensibility providing the usual CRUD operations. “Data Extraction” is intended for mass data extraction and able to manage a large amount of records. Therefore, you have to create two different views for two different scenarios and use proper naming conventions.

  • For marketing cloud, we do not recommend creating extraction enabled custom CDS view using Interaction and Interaction Contact as data sources

Although this feature provides flexibility to our customers, we recommend raising a Customer Influence portal request in case you want a CDS view to be extraction enabled – This can ensure a solid base of extraction enabled views within the product and is beneficial for all customers.


Further references and related blogs