Using delta extraction capability of ABAP CDS to SAP Data Warehouse Cloud
I was exploring SAP Data Warehouse Cloud and the features which are coming with first enterprise-ready, data warehouse in the cloud that integrate different data sources in one place which ensuring the security, trust, and create semantic layer for the data.
And I had curiosity to know how to load data from SAP S/4HANA to SAP Data Warehouse Cloud to Create views and tables to prepare data for my stories.
In my blog post I will show how to replicate data from SAP S/4HANA to SAP Data Warehouse Cloud in real-time using ABAP CDS views and get benefits from delta capabilities of ABAP CDS views to replicate in real-time only changed data.
**Note that I have tried to load data from SAP S/4HANA to SAP Data Warehouse Cloud using OData and ODP extractors but both approaches are replicated the data fully each time you request to load new snapshot and it is recommended to use snapshot replication (full loads) only for smaller amounts of data.
- For my scenario, I use a copy from standard ABAP CDS view I_SalesOrderItem and to the following changes:
- Change the ABAP CDS view technical name to ZI_SalesOrderItem
- Change sqlViewName to ZISDSLSORDERITEM
- Add Delta annotations to the newly created ABAP CDS view
- Add the below column to the selection list
- Save and activate the ABAP CDS view
- Now login to SAP Data Warehouse Cloud and go to Data Builder and select New Graphical view
- Select Sources Tab and search for ZISDSLSORDERITEM in the list of the extractors, the extractor should be under ABAP_CDS group as per the below screenshot.
- Drag and Drop the extractor and select Import and Deploy
- Enter Business name, technical name and Save
- Now go to Data integration Monitor tab and search for table ZISDSLSORDERITEM
- Change Data access from remote to Replicate
- Change Refresh Frequency to Real-time and press Start replication
- Status is changed to Active and used Disk is also changed
- Login to SAP S/4HANA system and run Monitor Delta Queue Requests T-Code ODQMON
You can see Delta queue requests and the 3 rows show that there is 1 request with extraction mode Delta Initialization without Data Transfer, another request Data Snapshot (Full) where all the data transferred to SAP Data Warehouse Cloud and last request Data Changes (Delta) with 0 rows transferred.
- Now go to VA01 and create a new sales order
- Back again to Monitor Delta Queue Requests T-Code ODQMON
Now you can see a new request with 1 row transferred to SAP Data Warehouse Cloud and extraction mode is Data Changes (Delta)
In this blog post I demonstrated step by step how to extract data with delta enabled from SAP S/4HANA to SAP Data Warehouse Cloud using ABAP CDS Views.
More information regarding ABAP CDS based data extraction, check this blog post
How to find best ABAP CDS view that fits your requirements , check this blog post
Learn more about Connecting to ABAP, SAP HANA, and OData , check this blog post
Please leave feedback or question in comment and I will be happy to answer.
Have a nice day !