In this blog we are going to cover 2 scenarios of data extraction from S/4HANA to Native HANA system using SDI.
In Part of the blog we are going to cover Data Extraction from BW Extractors to Native HANA system using SDI.
Requirement – To Extract BW Extractors Data from S/4HANA to Native HANA system.
Setup Data Provisioning Agent and register the same in Native HANA system Connecting Native HANA sytem to S/4HANA system using SDI with ABAP Adapter. BW Extractors should be ODP Enabled as ABAP Adapter supports the ODP Framework.
Detail Steps –
We will be connecting HANA system (HW4) with S/4HANA system (PLS).
SDI & DP Agent
Once the SDI and DP agent setup is done you would see your ABAP Adapter based connection s(PLS100) under Provisioning –> Remote Source
Remote Source PLS 100 – We can see that it supports extraction from ABAP_CDS and SAPI (BW extractors)
ABAP Adapter connection –
ABAP Adapter settings
Now we have to create a Virtual Table (VT_2LIS_02_ITM) on extractor 2LIS_02_ITM using context menu, which will act as a source for loading data into my target table. It was created under schema INF627126. Virtual table shows you the extractor data virtually in Native HANA system.
Virtual Table on Extractor
Create Target table where you want to persist the data. There are multiple ways of creating a column table. For POC we have used Virtual table as template and used the SQL console to create table. Create column table "02_ITM" as (select * from "INF627126″."VT_2LIS_02_ITM"). You can see the table in the above screen shot. You would use HDBCDS/HDBCDS to create table to transport to other environments. Now we have to create Flow Graph, it’s like creating a Process Chain in BW. This will load the data from source to target and you can apply transformation using different options available in the pallete. You should login to WEB IDE Editor using the link :80/sap/hana/ide/editor
Flow Graph Creation
In Flow Graph Use Data Source and choose the Virtual Table as shown in the below Pic.
Data Source in Flow Graph – Virtual Table Selection
We have to maintain the settings in the Data Source as shown below –
Data Source Settings
Note we have chosen Delta Extraction, Extraction Name is important as this name will be shown in ODQMON as subscriber name.
Drag a filter on canvas, Flow Graph will look like as below at the end. Filter is in the middle section. You can think of Filter as the projection node in HANA View, you can apply filter or create calculated columns in it.
Choose Output Type – And select the Target table which we created earlier.
Target Table Selection
Target Table – Writer Type – Insert
Save the Flow Graph. Now Fill the Setup table for Purchasing (02) Application component and check the number of records in RSA3.
Execute the flow graph and check the entries in the target table.
Target Table Entries
Check the ODQMON transaction for Extractor entry, subscriber name, init with data transfer and the number of records.
ODQMON – 2lis_02_itm – Init with data transfer
Let’s check the delta flow – Example with Purchase order 4500000001 Purchase Order Quantity in Target table – using data preview
Purchase Order – 4500000001
Check the PO in ME23n for Order qty.
ME23n – PO Qty
Change the PO Qty from 32 to 40 and save the same.
Change PO Qty
Check the entry in LBWQ – Extraction Queue which will save the delta entries
LBWQ – Extraction Queue
Run the V3 Job to push the data from Extraction Queue to ODQMON. You can run the Program RMBWV302 for the same. Execute the Flow Graph Check the target table entry – PO Qty changed to 40.
Target Table – PO Qty Delta Change
Check ODQMON for delta data
Delta Records in ODQMON
How to automate the Flow Graph Job –
Please follow the below HANA Academy’s youtube link which gives all the information you would need to automate the Flow Graph job.
What happens when you have to Enhance the Extractor –
In our example if we have to enhance the extractor 2LIS_02_ITM – We found that the virtual table starts throwing error once the extractor is enhanced. We did not find any way to refresh the virtual table to reflect the new enhanced field.
Possible Workaround –
Create new Virtual table (VT1) Delete the Source (i.e Virtual table) in the Flow Graph Select the source again with the new Virtual table (VT1) Keep the Extraction name same in the Source properties of Virtual table in Flow Graph as it was earlier Delete the filter used in the Flow graph Create New Filter and remap source & target to automatically reflect the new enhanced field available in the source or manually add the new field in the old filter. Modify target table for the new enhanced field of the Extractor. Execute the Flow graph with delta settings as it was before. Delta seems to work fine with the new enhanced field