ABAP CDS Views in BW Context
After completing this lesson, you will be able to describe ABAP CDS Views in BW context.
Below are three scenarios in which ABAP CDS views are used in BW:
Scenario A: BW query accessing transient providers directly in embedded BW in S/4HANA
Scenario B: Virtual Access of ABAP CDS Views in BW/4HANA via Open ODS Views
Scenario C: Extraction and loading of data (persistence) in BW/4HANA via ODP for CDS
In Scenario A, transient providers are automatically generated from CDS Views and no modeling is required.
The queries used in these cases also use CDS with annotation @Analytics.Query: true.
By using this annotation, queries are directed to run on analytic engine (prior name OLAP Processor) of the embedded BW.
In this scenario, transient providers are generated with annotation @Analytics.dataCategory: #CUBE
Embedded BW can only be used in very limited cases where data to be processed is less than 20% of the overall system.
Input parameters/variables defined in S/4HANA analytics CDS View must be defined in BW query as static filter.
Queries created on these transient providers can be transported through S/4HANA landscape, as transient provider is generated with same technical name across all the systems.
At this point, it is recommended to try creating a CDS view and use it as a transient provider.
In Scenario B, Transaction and Master data from S/4HANA is consumed in BW/4HANA via Open ODS Views.
SAP has not created any specific extractor for this as CDS views themselves can load data to BW without using extractor.
In this scenario, query will not support BW hierarchies, node variables and analysis authorizations.
In this scenario, one has real time access to data.
In Open ODS Views, one can do flexible modeling based on fields. Data from S/4HANA CDS views can be enriched with BW master data.
By using Composite provider, you can combine transactional data from S/4HANA with historical and plan data in BW/4 HANA.
The prerequisite for this scenario is HANA Smart Data access is configured in BW/4HANA system and connects S/4HANA system.
You can start with Open ODS Views for master data and then use Open ODS Views for transaction data.
Open ODS View should as client as key field.
At this point, you can try using CDS view as a source for Open ODS View.
In Scenario C, ABAP CDS views can extract and load data to BW/4HANA using special annotations and it can replace existing extraction mythology.
In this scenario, ABAP CDS view act as replacement for old BW extractors.
With release BW 7.5 SP05 powered by HANA (BW4HANA SP01), ABAP based CDS views can be used for data extraction.
These CDS views will be used in new ODP context “CDS”
A prerequisite for this is SAP BW/4HANA has new ODP source system for this context.
S/4HANA as source should have minimum Netweaver 7.5 SP04 for full loads.
For delta loads, S/4HANA should have minimum Netweaver 7.5 SP05 or SAP BW/4HANA SP01.
ABAP CDS views need annotation @dataExtraction.enabled for any extraction.
Additional annotation for real time data extraction is @dataExtraction.delta.byElement.name using UTC timestamp date field from table underlying ABAP CDS View.
Hierarchy extraction is also supported.

Annotations are the special tags that, during activation, generate views with specific behaviors.
Only views with these annotations are available as data sources.
The figure “by element.name” is also critical. It identifies which field will be used for the delta logic.
DelayInSeconds annotation determine delta records accurately.
The default value is 1800 sec (30 mins). For example, if record is saved at time x, it does not get committed to database till x+2 sec. If we run the DTP at x+1, this record is missed. With delay parameter set, record that are not extracted previously with x+1-1800 will be extracted along with records at time x.
DeletionAfterDays annotation: You should also indicate if records deleted should be extracted or not by CDS datasource. For example, if we execute the DTP on day x and this setting is at 5, then record deleted x-4 days ago will be sent but record deleted x-10 will not be sent.

In HANA Studio, the correct CDS view package is important
VDM = superpackage APPL
=> package VDM_SD
=> package VDM_SD_SLS
for example, for CDS view I_SALESORDERITEM
Refer to below link to know more about CDS Views
There are four different ways in which you can search for CDS views in the system:
- CDS View Explorer
- transaction VDM_CDS
- packages in HANA studio
- Help
Steps to create CDS View Datasource:
- Create CDS view based ODP source system
- Activate a delivered CDS view with proper annotations, Datasource based on ODP is automatically created
- Create DTP and transformation
- Create process chain or streaming process chain if required.
- Load the data
Some useful links to know more about CDS Views:
Youtube: SAP HANA Academy: CDS Views
Analytic Annotation: SAP Help Portal
ABAP CDS – SELECT, element – ABAP Keyword Documentation (sap.com)
1 Comment