2

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

 2 years ago
source link: https://blogs.sap.com/2022/09/06/extract-and-integrate-data-from-sap-s-4hana-cloud-using-cpi-part-i/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
September 6, 2022 2 minute read

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 Venu Krishna 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.

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 .

46.png

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

47.png
48.png

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

49.png

create  purchase order item subscription :

51.png
52.png
53.png

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

54.png
55.png

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  

56.png

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


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK