| Status | |
|---|---|
| Owner | The person responsible for driving this decision and documenting it. Type @ to mention people by name |
| Stakeholders | The business stakeholders involved in making, reviewing, and endorsing this decision. Type @ to mention people by name |
| Jira Request ID | |
| Jira Development ID |
| Implementing System | SAP S/4HANA |
|---|---|
| Invoked by | Standard Ariba Guided Buying Integration via CIG |
| Business Process Reference | 03.04.03.01. Create Purchase Orders |
test-integration.eu.managedgateway.cloud.sap |
Once a requisition is fully approved in Ariba Guided Buying, a PO is immediately created. This approved PO is then exported in real-time to S/4HANA using the standard Ariba Purchase Order export feature, which relies on the Cloud Integration Gateway (CIG) for seamless communication through the Cloud Connector. Exporting purchase orders, when using CIG channel occur in real-time. This interface is triggered when the Purchase Orders are created and fully approved in Ariba Guided Buying and are ready to be sent to S/4HANA.
End-to-end integration via CIG is achieved using Cloud Connector. The format of the messages that are sent through CIG via Cloud Connector from Ariba Guided Buying to S/4HANA and the format of the expected responses from S/4HANA are defined in WSDL files (Web Service Description Language).
CIG receives and consumes the PO data. CIG maps the web service XML to the required RFC structure by S/4HANA and CIG sends the PO data to S/4HANA through Cloud Connector.
S/4HANA then returns either a success or error message (including error details) to Ariba Guided Buying via CIG.
This document describes S/4HANA System inbound interface for sending purchase order information from Ariba Guided Buying to S/4HANA System. Purchase Order from Ariba Guided Buying will be exported to S/4HANA System via SAP Integration Suite, Managed Gateway for Spend Management and SAP Business Network (formerly known as Cloud Integration Gateway).
The following Purchase Order web service integration events (and the corresponding document types) will be used to export PO creation, changes and cancellation:
Document Type in CIG - PurchaseOrderExportRequest
Document Type in CIG - PurchaseChangeOrderExportRequest
Document Type in CIG - PurchaseCancelOrderExportRequest
There will be no scheduled task of data transmission as data is transferred in real-time. Each submission of transactional data from Ariba Buying to the S/4HANA System requires a response from the receiving S/4HANA system that the data was successfully received and imported, or details about the error that occurred during the import.
Reply message for PO creation, change and cancel is not in scope of this FS and separate FS covers the reply message
Process Flow Diagram

PO Create
| Step | Description | Comment |
|---|---|---|
| 1 | Purchase Requisition (PR) is created and fully approved in Ariba Guided Buying. PR status is updated from “Approved” to “Ordering”. Purchase Order (PO) data is automatically created and sent to S/4HANA via CIG through Cloud Connector. PO Data is sent to CIG in XML format. | |
| 2 | CIG receives and consumes the PO data. CIG maps the web service XML to the required RFC structure by S/4HANA and sends the data to S/4HANA through Cloud Connector. | |
| 3 | In S/4HANA, the RFC/BAPI is executed. The PO data is created, and RFC/BAPI will return a response message back to CIG with SAP record ID of the document. The response message includes the S/4HANA ERP Order ID when PO is successfully created in S/4HANA; otherwise, error response is sent back to Ariba Guided Buying via CIG. | |
| 4 | CIG consumes the response message, converts to Web Service message and push to Ariba Guided Buying. | |
| 5 | Ariba Guided Buying consumes the WS message and updates the status of the transactional document. When a success response message is received from S/4HANA:
When an error response message is received from S/4HANA The PR status is updated from “Ordering” to “Composing”, a new version of the PR is created, and S/4HANA error details are reflected on the PR comments in Ariba Guided Buying. |
PO Change
| Step | Description | Comment |
|---|---|---|
| 1 | Purchase Order (PO) change is submitted and fully approved in Ariba Guided Buying. PO status is updated from “Ordered” to “Ordering”. PO change data is automatically created and sent to S/4HANA via CIG through Cloud connector. PO Data is sent to CIG in XML format. | |
| 2 | CIG receives and consumes the PO data. CIG maps the web service XML to the required RFC structure by S/4HANA and sends the data to S/4HANA through Cloud Connector. | |
| 3 | In S/4HANA, the RFC/BAPI is executed. The PO change data is posted, and RFC/BAPI will return a response message back to CIG with SAP record ID of the document. The response message includes the S/4HANA ERP Order ID when PO is successfully changed/updated in S/4HANA; otherwise, error response is sent back to Ariba Guided Buying via CIG. | |
| 4 | CIG consumes the response message, converts to Web Service message and push to Ariba Guided Buying. | |
| 5 | Ariba Guided Buying consumes the WS message and updates the status of the transactional document. When a success response message is received from S/4HANA:
When an error response message is received from S/4HANA: The PR status is updated from “Ordering” to “Composing”, a new version of the PR is created, and S/4HANA error details are reflected on the PR comments in Ariba Guided Buying. |
PO Cancel
Step | Description | Comment |
|---|---|---|
1 | Purchase Order (PO) is canceled in Ariba Guided Buying. PO status is updated from “Ordered” to “Canceling”. PO cancelation is automatically sent to S/4HANA via CIG through Cloud Connector. PO Data is sent to CIG in XML format. | |
2 | CIG receives and consumes the PO cancel data. CIG maps the web service XML to the required RFC structure by S/4HANA and sends the data to S/4HANA through Cloud Connector. | |
3 | In S/4HANA, the RFC/BAPI is executed. The PO Cancel data is posted, and RFC/BAPI will return a response message back to CIG with SAP record ID of the document. The response message includes the S/4HANA ERP Order ID when PO is successfully canceled in S/4HANA; otherwise, error response is sent back to Ariba Guided Buying via CIG. | |
4 | CIG consumes the response message, converts to Web Service message and push to Ariba Guided Buying. | |
5 | Ariba Guided Buying consumes the WS message and updates the status of the transactional document. The PR and PO status is updated from “Canceling” to “Canceled”. |
The following are the Security and Authorization considerations for this interface:
Ariba Configuration
Ariba Web Services enables exchange of data between Ariba Guided Buying and other systems, such as S/4HANA System, for real-time data integration.
Ariba Web Services provide integration tasks that send and receive SOAP messages for web services. An integration task requires an end point for the logical communication channel used by the web service. An end point consists of the URL and authentication information that controls access to the end point. There are two types of end points: inbound and outbound. Inbound end points are used when the task is initiated by the S/4HANA system. Outbound end point is used when the task is initiated by the Ariba Guided Buying.
Here, the Web Services channel provides real-time integration of Ariba Buying with S/4HANA system using SAP Integration Suite, Managed Gateway for Spend Management and SAP Business Network.
Configure the purchase order integration, change purchase order integration, and cancel purchase order integration between SAP Ariba Procurement solutions and SAP ERP or SAP S/4HANA.
Ariba Integration Task | End Point Type | Interface Name |
Export Purchase Orders Asynchronously | Outbound | CIG |
Export Change Purchase Orders Asynchronously | Outbound | CIG |
Export Cancel Purchase Orders Asynchronously | Outbound | CIG |
For purchase orders and change purchase orders, enable Application.Procure.AllowAttachmentToERP and Application.Ordering.AllowOrderAttachmentToERP parameters.
To control the file formats that can be attached to purchase orders in Ariba, use the parameter Application.Approvable.AllowedAttachmentExtensions. File formats that are not specified cannot be used as attachments. This parameter is useful for restricting file formats (such as EXE files) that might violate company security policies.
CIG Configuration
Project setup is required in CIG to cover product type Ariba Procurement. One project is required per system ID of the backend S/4 system. With respect to Purchase Order Create and Change, there's additional setting in the Cross Reference → Parameter section where the set of parameters have to be maintained
| PurchaseOrderExportRequest | PurchaseOrderChangeExportRequest | |
|---|---|---|
| Service Text ID | LTXT | LTXT |
| Header Text ID | F01 | F01 |
| SAP Document Type | ZAR | N/A |
| Item Text ID | F01 | F01 |
| SAP CC Document Type | ZAR | N/A |
| SAP Framework Order DocType | ZAR | N/A |
Project must be published and set to "in testing" in order for transactions to be used
CIG Custom Routing
Project definition in CIG configuration is repeated for every backend S/4 system [ at the moment there's a plan for Global, US and China S/4 backends ]. In CIG → My Configurations → Custom Routings there's a definition for
| Parameter | Value |
|---|---|
| Direction | Inbound |
| Action | Replace SystemID |
| Document Type |
|
| Xpath |
|
| Action Value | respective SystemID based on the Company Code value |
CIG Addon Configuration
Configuration for CIG addon is consolidated in one place and should be completed in the logical order of the menu items. In the S/4 instance, navigate to SPRO → SAP Reference IMG →SAP Customizing Implementation Guide → Integration with Other SAP Components → Managed Gateway for Spend&Network for Buyer
Logical order of the menu is as following :
| Parameter Name | Value [ TEST ] | Value [ PROD ] |
|---|---|---|
| Technical Settings.Target System Settings.Host | http://test-integration.eu.managedgateway.cloud.sap | http://integration.eu.managedgateway.cloud.sap |
| Technical Settings.Target System Settings.Path Prefix | /cxf/receiveERPMD | /cxf/receiveERPMD |
| Login And Security User | P007937 | P007937 |
| Login And Security Password | <confidential> | <confidential> |
Not Applicable
Not Applicable
Standard mappings are a subject to change and are not linked in this documentation, latest excel sheet can be downloaded from CIG → Resources → Implementation Guides → Mapping Specs → Ariba Buyer
Each of the mapping contain basic field mapping from SOAP message into RPC structure with a basic logic explained in the pseudo code
Processing Logic
Web Service is triggered based on the state of the source document. Once Purchase Requisition is fully approved, Purchase Order is created and the SOAP message is triggered to the backend system. Message is triggered in the asynchronous way, meaning the web service doesn't wait for the reply from S/4, but consider success if reply 200 is received from CIG.
At this moment, no customisations are agreed on and extension to the standard WSDL data structure for any of the Purchase Order flows is not needed. Customisation will be defined in the later stage of the project once all processes are finalised. FS will be extended against a new Jira ticket if needed
Processing within Middleware
At this moment, standard transformation as referenced above is in place. In a case of any custom field is needed, custom field will be mapped in the CIG to the predefined custom field structure in the SAP
Each flow triggers an Ariba specific BAPI, which serves as a wrapper over SAP standard BAPI. On top of it, there's BAdl that can be used to handle customisations if needed. It's called before the data structure is passed to the standard SAP BAPI for processing.
| Flow | Ariba CIG BAPI | Standard BAPI called | Available BAdl |
|---|---|---|---|
| Purchase Order Create | ARBCIG_BAPI_PO_CREATE1 | BAPI_PO_CREATE1 | ARBCIG_BUY_PURCHORD_BADI |
| Purchase Order Change | ARBCIG_BAPI_PO_CHANGE | BAPI_PO_CHANGE | ARBCIG_BUY_ORDCHANGE_BADI |
| Purchase Order Cancel | ARBCIG_BAPI_PO_CANCEL | BAPI_PO_CANCEL | ARBCIG_BUY_ORDCHANGE_BADI |

Posted PO can be viewed in me23n transaction
Interface Dependency
Not Applicable
Not Applicable
Not Applicable
Not Applicable
| System to be monitored | How to monitor | What can be monitored |
|---|---|---|
| Ariba Guided Buying | Integration events → Data Import Export → Web Service Status →
| In the event of failure of communication between Ariba Guided Buying a CIG, error message can be found here. Notification about the failure can be send to the admin of the system |
| CIG | Transaction Tracker
| Transactions are stored for 30 days. Each transaction is referenced by the PO ID and the payloads, one received from Ariba and one sent to S/4 instance can be downloaded |
| S/4 system | SRT_MONI | details of the inbound web service in the event of failure, the exception can be found in here |
Interface Reporting
30 days of history per transactional document type can be retrieved from CIG. It's not possible to pull a consolidated report, just the details of the particular transaction
Not Applicable
Not Applicable
There are no specific performance requirements or considerations related to this interface.
The S/4HANA System integration provides reliable data exchange between Ariba Guided Buying through CIG. However, in some cases, the integration event on the Ariba Guided Buying cannot recover automatically and must report the error to the appropriate administrator. When an error occurs, the integration event on the Ariba Buying System does the following:
An administrator can monitor the errors using the transaction code, SRT_MONI.
Test Conditions and Expected Results
| ID | Condition | Expected Results |
|---|---|---|
Create requisition in Ariba Guided Buying and fully approve. PO creation in S/4HANA successfully | Purchase Order should flow from Ariba Guided Buying to S/4HANA via CIG. PO is created in S/4HANA and returns a response to Ariba Guided Buying that includes the ERP PO ID. The PR and PO is updated with the ERP Order ID from S/4HANA. PR and PO status is updated from “Ordering” to “Ordered” in Ariba Guided Buying. | |
| Create requisition in Ariba Guided Buying and fully approve. PO creation in S/4HANA unsuccessful | Purchase Order should flow from Ariba Guided Buying to S/4HANA via CIG. PO is not successfully created in S/4HANA and an error response is sent to Ariba Guided Buying. The PR status is updated from “Ordering” to “Composing”, a new version of the PR is created, and S/4HANA error details are reflected on the PR comments in Ariba Guided Buying. | |
Change requisition in Ariba Guided Buying and fully approve Change PO successful in S/4HANA | Changed Purchase Order should flow from Ariba Guided Buying to S/4HANA via CIG. S/4HANA returns a response message to Ariba Guided Buying. The response message includes the S/4HANA ERP Order ID when PO is successfully changed/updated in S/4HANA The new version of the PR and PO status is updated from “Ordering” to “Ordered” in Ariba Guided Buying. | |
Change requisition in Ariba Guided Buying and fully approve. Change PO unsuccessful in S/4HANA | Changed Purchase Order should flow from Ariba Guided Buying to S/4HANA via CIG. S/4HANA returns an error response message to Ariba Guided Buying. The PR status is updated from “Ordering” to “Composing” in Ariba Guided Buying, a new version of the PR is created, and S/4HANA error details are reflected on the PR comments in Ariba Guided Buying. | |
Cancel PO in Ariba Guided Buying | Canceled Purchase Order should flow from Ariba Guided Buying to S/4HANA via CIG. The PR and PO status is updated from “Canceling” to “Canceled” in Ariba Guided Buying. | |
Create requisition with one item, select item category material in Ariba Guided Buying. Fully approve requisition. PO Created in S/4 successfully | PO Created in S/4 system. EKPO table contains correct item category - blank space | |
Create requisition with one item, define planned service in Ariba Guided Buying. Fully approve requisition. PO Created in S/4 successfully | PO Created in S/4 system. EKPO table contains correct item category - E | |
Create requisition with one item, define unplanned service in Ariba Guided Buying. Fully approve requisition. PO Created in S/4 successfully | PO Created in S/4 system. EKPO table contains correct item category - E | |
Create requisition with one item, select commodity code that is setup as receivable. Fully approve requisition. PO Created in S/4 successfully | PO Created in S/4 system. EKPO table contains GR flag set to X | |
Create a requisition with On Behalf Of value different from your user. Fully approve requisition. PO Created in S/4 successfully | PO Created in S/4 system. EKKO table has a creator set for the user who created Requisition in Ariba. EKPO Table has a requisitinioner set to the On Behalf Of value from Ariba | |
Create requisition for the company code used in China S/4 system. Fully approve requisition. PO Created in S/4 successfully | PO Created in China S/4 system. In the transactional history in CIG, in the payload the system id of S/4 system is correctly set by the conditional routing logic | |
Create a Requisition in GB with three line items, fully approve. All the items are for the same supplier | Single PO is created in S/4HANA via CIG. PR and PO status is updated from “Ordering” to “Ordered” in Ariba Guided Buying. | |
Create a Requisition in GB with three line items, fully approve. Each Line Item has a different supplier | Three different POs are created in S/4HANA via CIG. PR and POs status is updated from “Ordering” to “Ordered” in Ariba Guided Buying. | |
Create a Requisition in GB with the attachment on the header, fully approve. | PO Created in S/4 system. Attachment is available on the Purchase Order viewed in me23n transaction | |
Create a Requisition in GB with the attachment on the line item, fully approve. | PO Created in S/4 system. Attachment is available on the Purchase Order viewed in me23n transaction |
| Package Name | Parent Package |
|---|---|
Other Development Objects
| Object Type | Object Name | Purpose/High Level Logic | Design Rationale Reference |
|---|---|---|---|