Skip to Content
Technical Articles
Author's profile photo Rashmi Joshi

SAP Ariba Integration using SAP Cloud Integration(CPI)

Hi SAPiens,

This technical document contains details on how to upload file from 3rd party application to Ariba Buying portal via SAP CI/CPI.

For this interface I have used import batch data task of Ariba system. Batch import feature is used in Ariba to download/upload files which is used by ITK mechanism – Ariba Integration Toolkit Guide.

Attached is list of supported file using import batch data task – Import Batch Data Supported Files

Requirement is to get the data from non-SAP application in zip format and then upload this file in the Ariba buying solution. In order to upload the file below payload format needs to be used.

In case of any error or failure message, exception sub process will trigger alert email to process owner.

Payload structure –

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<Header>
<Parameters>
<Parameter name="realm"><value>${property.realmID}</value></Parameter>
<Parameter name="sharedsecret"><value>${property.sharedsecretariba}</value></Parameter>
<Parameter name="operation"><value>{{operation}}</value></Parameter>
<Parameter name="event"><value>{{event}}</value></Parameter>
<Parameter name="clienttype"><value>SAP</value></Parameter>
<Parameter name="clientversion"><value>1.00</value></Parameter>
<Parameter name="clientinfo"><value>Data uploaded via SAP CPI</value></Parameter>
</Parameters>
<AttachmentFolder contentID="contentID" contentType="application/zip" fileName="GroupConsolidated.zip" contentLength="1"><Content>${in.body}</Content></AttachmentFolder>
</Header>
</soapenv:Body>
</soapenv:Envelope>
Parameters used in payload -
1.realmID - Ariba buying realm name
2.sharedsecretariba - Created secure parameter in CPI and using groovyscript I am reading this value
3.operation - Load
4.event - Import Batch Data
5.${in.body} - Base64 encoded zip file

 

Below is the CPI – IFlow Design

Below are the execution steps IFlow

  1. Content Modifier Get shared secret – Passing secure parameter name to property

2. Base64 Encoder – Encode incoming message into base64 encoding

3. Groovyscript Setting Post URL to set header element with Ariba HTTP Post URL

4. GroovyScript Setting shared secret to store Ariba shared secret password as property

5. Content Modifier Ariba Configuration to form payload structure

6. Content Modifier Removing shared secret Delete $name=sharedsecretariba

7. Receiver HTTP adapter to post data on Ariba buying portal for e.g. https://s1-integration.ariba.com/Buyer/fileupload?realm=aribaID

Note : To upload files on sourcing portal HTTP post URL syntax is https://{host}/Sourcing/fileupload?realm=aribaID

8. Content modifier Storing Ariba Response to capture success or error message from Ariba system with expression property aribaresponse = ${in.body}

Exception Sub process is used to generate alert email body with exception trace and payload and send email notification to process owners

Upon save and CPI, copy the HTTP endpoint URL. For testing purpose I have used postman tool to trigger the IFlow

SAP CPI – Message Monitoring

In Ariba Buying Portal, navigate to Data Import/Export section and search for tasks – Import Batch Data

Click on completed status to get details of the import transaction

Postman is updated with Ariba response payload –

Hence, we can use import batch data tasks to import files on Ariba provided we are using data elements from list of supported files via SAP Cloud Integration (CPI).

References links :-

https://help.sap.com/docs/buying-invoicing/administration-and-data-maintenance-fundamentals/default-batch-data-import-operations-6bc1ae73c1da1014b1d894bda53fac04?version=2302

https://help.sap.com/docs/cloud-integration/sap-cloud-integration/sap-cloud-integration

 

#HappyLearning

– Rashmi Joshi

 

Assigned Tags

      3 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Shaik Azmathulla
      Shaik Azmathulla

      Informative blog . Good .

      Author's profile photo Praveen Rohankar
      Praveen Rohankar

      Thanks for sharing this.

      Just trying to validate my understanding on the use case discussed here.

      Why would any customer procure SAP CPI license to push the Master data to Ariba but rather may prefer to use their existing middleware.

      Any thoughts ?

      Author's profile photo Jing Lin Shao
      Jing Lin Shao

      Thanks for sharing.

      I use the standard iflow to import purchase order status with po id to Ariba with the zip file , it show completed status for corresponding task , and the detailed information showed the 1 row update , but the corresponding PO status not updated. Can you give me some suggestion? thanks