ml-connector
SAP S/4HANASAP Ariba

SAP S/4HANA and SAP Ariba integration

SAP S/4HANA runs finance and procurement as the system of record. SAP Ariba runs sourcing, procurement, and supplier management. Connecting the two keeps supplier master data aligned and brings Ariba procurement activity into the S/4HANA ledger without re-keying. Purchase orders, invoices, and requisitions extracted from Ariba reporting jobs post into S/4HANA, while supplier and registration changes move back to Ariba. ml-connector handles the OData and REST differences on each side and moves the data on a schedule you control.

How SAP S/4HANA works

SAP S/4HANA exposes suppliers as Business Partners, plus supplier invoices, purchase orders, purchase requisitions, GL accounts, journal entries, and cost centers through OData V2 and V4 services at a tenant-specific URL. System-to-system access uses OAuth 2.0 client credentials, with Basic auth as a fallback, and every external call first requires an SAP admin to activate a Communication Arrangement for that service. Read paths support delta filtering on LastChangeDateTime, while every write (POST, PUT, PATCH, DELETE) requires fetching an X-CSRF-Token first. S/4HANA Cloud has no native outbound webhooks, so records are read by polling unless SAP Event Mesh is licensed.

How SAP Ariba works

SAP Ariba exposes procurement data through REST Open APIs. Purchase orders, invoices, and requisitions come from the Operational Reporting API for Procurement as async jobs: submit a job filtered by an updated-date window, poll for completion, then download paginated results. The Supplier Data API is synchronous and paginated, and supports reading supplier profiles and updating registration, qualification, and decision status. Every call carries an OAuth2 bearer token plus a static apiKey header, with the realm passed as a query parameter. Ariba has no general outbound webhooks, and procurement document writes such as invoice creation go through cXML, not the REST APIs.

What moves between them

Procurement transactions flow from SAP Ariba into SAP S/4HANA. ml-connector submits Ariba reporting jobs for purchase orders, invoices, and requisitions, downloads the results, and posts the matching supplier invoices and GL journal entries into S/4HANA against the correct GL accounts and cost centers. Supplier master data is aligned both directions: S/4HANA Business Partner changes push into Ariba supplier records, and Ariba registration and qualification status updates flow back to keep the vendor view consistent. GL accounts and cost centers in S/4HANA are read as reference data so every posted line lands on a valid dimension. The cadence follows your reporting window rather than a push, since neither system offers general webhooks.

How ml-connector handles it

ml-connector stores both credential sets encrypted. On the Ariba side it sends the OAuth2 bearer token, the static apiKey header, and the realm query parameter on every request, refreshing the one-hour token before expiry. On the S/4HANA side it requests an OAuth2 token against the tenant endpoint and, before any write, fetches an X-CSRF-Token and replays the session cookies, re-fetching the token and retrying when a write returns 403. Ariba reporting jobs are async and capped at a one-year window, so backfills are submitted in annual chunks, and the connector keeps the last successful updated-date as a high-water mark so re-running a job does not double-post. S/4HANA rejects duplicate supplier invoices with the same reference, company code, and fiscal year, which guards posting, and ml-connector also follows the OData nextLink and Ariba pageToken cursors rather than calculating offsets. Both sides return HTTP 429 with backoff guidance, so requests retry with exponential backoff, and every record carries a full audit trail and can be replayed if a downstream call fails.

A real-world example

A mid-sized manufacturer with around 1,200 employees runs SAP S/4HANA for finance and procurement and uses SAP Ariba for sourcing, supplier onboarding, and indirect purchasing. Before the integration, the procurement team approved suppliers and ran requisitions in Ariba, then a clerk re-keyed approved invoices and supplier details into S/4HANA each week, and month-end close stalled while finance reconciled Ariba spend against the ledger. With SAP S/4HANA and SAP Ariba connected, invoices and purchase orders extracted from Ariba reporting jobs post into S/4HANA automatically against the right GL accounts and cost centers, and supplier registration changes stay aligned. The re-keying step is gone and close starts from numbers that already tie out.

What you can do

  • Post SAP Ariba invoices and purchase order data into SAP S/4HANA as supplier invoices and journal entries on the correct GL accounts and cost centers.
  • Extract Ariba purchase orders, invoices, and requisitions through the async reporting jobs, in annual chunks for backfills.
  • Keep supplier master data aligned by pushing S/4HANA Business Partner changes into Ariba and reading registration and qualification status back.
  • Bridge S/4HANA OAuth2 plus the X-CSRF-Token write step with Ariba's bearer token, apiKey header, and realm query parameter.
  • Poll on the schedule you set with exponential backoff on rate limits and a full audit trail and replay on every record.

Questions

Which direction does data move between SAP S/4HANA and SAP Ariba?
Procurement transactions move from SAP Ariba into SAP S/4HANA, where Ariba invoices and purchase orders post as supplier invoices and journal entries. Supplier master data is aligned in both directions, with S/4HANA Business Partner changes pushed into Ariba and Ariba registration and qualification status read back. GL accounts and cost centers in S/4HANA are used as reference data so every posted line lands on a valid dimension.
Why does ml-connector use Ariba reporting jobs instead of a simple data endpoint?
SAP Ariba has no simple GET endpoint for bulk procurement documents. Purchase orders, invoices, and requisitions come from the Operational Reporting API as async jobs: submit a job for an updated-date window, poll until it completes, then download paginated results. Each job is capped at a one-year window, so ml-connector submits annual chunks for backfill and tracks a high-water mark to avoid reprocessing.
How does the integration handle SAP S/4HANA write requirements?
Every S/4HANA write requires an X-CSRF-Token, so ml-connector first issues a fetch request, captures the token and session cookies, and includes them on each POST, re-fetching and retrying if a write returns 403. S/4HANA also rejects duplicate supplier invoices that share a reference number, company code, and fiscal year, which adds a built-in guard against double posting. A Communication Arrangement for each service must be active on the tenant before any of these calls succeed.

Related integrations

Connect SAP S/4HANA and SAP Ariba

Free to use. Add your credentials, ping your real systems, and see if we fit.

Get started