Extract and Integrate Data from SAP S/4HANA Cloud by using CPI Part I

In the  blog Extract and Integrate Data from SAP S/4HANA Cloud using CDI by Murthy, the method of data integraion with the tool CDI has been clearly explained .

But some customers haven’t purchased CDI , they only have purchased CPI and they also have the requirements to do data integration with S/4 hana cloud , Is it possible to do this with CPI . By this blog, I want to do some discovery with CPI .

Note:  For data integraion , I recommand SAP Data Intelligence or SDI or BW ETL .But comparing to the method of using business Odata API to do data integration with S/4 Hana Cloud, I recommend to use CDI Api(SAP_COM_0531) with CPI to do data integration.

In the blog Part I , I will show steps to  use postman to test CDI Api(SAP_COM_0531) in S/4 Hana Cloud and communication arrangement is SAP_COM_0531 base on wiki.

Prerequisite:

1, Customer has S/4 Hana Cloud gone alive

2, You have installed postman .

Procedure:

Step 1:  Create communication system, communication user, communication arrangement in S/4 Hana Cloud .

Step 2,  Query CDS provider to find the purchase order item provider ID .

Step 3 , Create  Subscription for purchase order item with following json data :

{"NamespaceID": "ABAP_CDS","ProviderID": "C_PURCHASEORDERITEMDEX","Description": "Data Extraction View for PO Item","Filter": "CompanyCode eq '1710'","Selection":"PurchaseOrder,PurchaseOrderItem,PurchaseOrderType,PurchasingGroup,PurchasingOrganization,Supplier,Material,PurchaseOrderItemText,CompanyCode,NetAmount,LocalCurrency","EntitySetName": "Facts"}

get  x-csrf-token

create  purchase order item subscription :

Step 4,  Use CurrentDeltaLink from subscription to do initial  data extract from S/4 Hana Cloud

In initial data extract, the data volumn maybe hug, the data can not be extracted with one extraction, we can use nextLink which include deltatoken and skipToken to do the next initial extraction untill all the data has been extracted .

Step 5,  After all the initial data extractions have been fully done, we can find both CurrentDeltaLink and PreviousDeltaLink in reading subscription, we can use CurrentDeltaLink to do delta data extraction from S/4 Hana Cloud  

The End!

In the next blog Part II, I will explain how to use CPI to realize  data initial extract and Delta extact from S/4 Hana Cloud .

Best Regards!

Jacky Liu