The most used scenario for using cloud integration flow is alongside S4 system. As majority of SAP customer’s system are presumably still ECC or S4 on-premise, this tutorial will guide yo.u how to create a cloud integration flow that consumes S4 on-premise data.
Prerequirestes:
- Cloud Connector setup and connection is established to your BTP subaccount and S4 on-premise system.
- Resource path for Odara service (/sap/opu/odata) is allowed for all the sub-paths.
Successfully connected to BTP subaccount
Successfully connected to S4
Go to BTP subaccount ->Connectivity->Cloud Connector to check the connectivity established with Cloud Connector.
With this, the cloud connector setup is complete.
1. S4 on-premise Odata service
Check the S4 on-premise Odata service metadata and the entityset to be consumed. For the purpose of this demo, we will use API_SALES_ORDER_SRV Odata service and entity set A_SalesOrder, which will return all the sales order data from S4 on-premise. You can test the Odata service in your S4 system by going to tcode “/n/IWFND/MAINT_SERVICE”.
2. Cloud Integration Flow
Go to Integration Suite, create a package and add an integration flow.
Below is the end result once you finish. Each event is explained step by step below.
3. Integration Flow trigger
For easily test the flow, add a timer and set as run once.
4. Add External Call
From the top bar, choose icon for Call->External Call->Request Reply. Place inside the flow.
5. Add Odata Call Receiver
From the top bar, choose icon participant and choose Receiver. Place it outside the flow.
6. Configuring OData call
Drag an arrow from the Request Reply box and connect to the receiver outside the flow. Choose Odata V2 as the connection type. Connect the Timer with request reply box as well.
Click on the Odata arrow and set the connection details.
Address | http:///sap/opu/odata/sap/API_SALES_ORDER_SRV |
Proxy type | On-Premise |
Authentication | Basic Authentication |
Credential name | <See below> |
CSRF protected | x |
Reuse connection | x |
Important!
Always use principle propagation for production environment. Basic authentication is used for the sake of simplicity for the demo.
For Credential name section, we must create register the login information in Integration Suite. Open a separate tab and open Integration Suite-> Monitor-> Integration and APIs-> Security Material. Create as User Credentials. Enter your user ID and password.
Set the credential name to the “Credential Name” field in integration flow.
Go to Processing tab and fill in the query details. For resource path, click on the Select on the right.
After choosing Select, separate screen to guide the Odata details. Fill in below deitals and make sure to use metadata for the address. Click on Step 2.
Choose Operation GET, Select Entity A_SalesOrder and tick Select All Fields button. Finish.
Now the details should be set.
7. Write OData output
Choose Persistence icon from the top bar and Data Store Operations -> Write. Place it inside the flow after Request Reply and connect using an arrow. Connect to the end event that comes after.
Click on the Write event and set the processing details as below.
8. Testing
Save the change and deploy the integration flow.
Check the data store from Monitor->Integrations and APIs from the left side pane. Go to Manage Data Store tile and find the output with your name. Download the entry and the sales order details consumed from Odata should be displayed.