ml-connector
SAP ECCSAP Ariba

SAP ECC and SAP Ariba integration

SAP ECC runs your on-premises enterprise financials and procurement. SAP Ariba runs your cloud sourcing, contracts, and invoice management. Connecting them keeps vendor master data and invoice records aligned without manual re-entry. Purchase orders created in Ariba sync to ECC's purchase order tables, and invoices in Ariba post into ECC's GL accounts and vendor subledgers so month-end close begins with PO, receipt, and invoice all matched. ml-connector bridges the RFC/BAPI layer on the ECC side and Ariba's REST Open APIs on the cloud side.

How SAP ECC works

SAP ECC exposes vendors, customers, materials, purchase orders, invoices, GL accounts, and cost centers through BAPI function modules, OData v2 REST via SAP Gateway, SOAP/WSDL, or IDoc XML HTTP. BAPI calls use RFC (Remote Function Call) via an on-premises agent running SAP .NET Connector or Java Connector, or HTTP Basic Auth for OData and IDoc HTTP endpoints. Write operations like invoice posting require explicit BAPI_TRANSACTION_COMMIT to avoid locked documents. ECC publishes no native webhook registry, so data is read by polling on a schedule or on demand via RFC_READ_TABLE and related table read BAPIs. Outbound IDoc push is available if the SAP Basis team configures WE21/WE20/SM59.

How SAP Ariba works

SAP Ariba exposes purchase orders, invoices, suppliers, requisitions, and contracts through REST Open APIs at https://openapi.ariba.com and https://api.ariba.com. Every API call requires OAuth2 client credentials and a static API key header on the same request. Read operations use async reporting jobs: submit a job with date filters, poll for completion via jobId, and paginate results up to 50,000 records per call. Write operations for invoices and PO changes use SOAP/cXML, not REST. Ariba has no outbound webhooks from the REST Open APIs, so data retrieval is polling only. Rate limits vary by endpoint from 1 to 300 per second. OAuth tokens expire in one hour, so token caching and pre-expiry refresh are required.

What moves between them

The primary flow reads from SAP Ariba into SAP ECC. Invoices and POs are read from Ariba via async reporting jobs, mapped to ECC vendor masters and GL dimensions, and posted into ECC's vendor ledger (tables LFB1/LFM1) and general ledger (BSEG) using BAPI_ACC_DOCUMENT_POST. Vendor master data is synchronized bidirectionally: Ariba suppliers that are not in ECC are created via BAPI_VENDOR_CREATE, and changes to existing vendors are updated via BAPI_VENDOR_CHANGE. The sync runs on a schedule tied to your procurement and invoicing cycle, typically daily or after invoice batches arrive in Ariba. SAP ECC is the system of record for GL posting, so invoice write-back to Ariba is not performed.

How ml-connector handles it

ml-connector maintains an on-premises agent connection using the customer's SAP .NET Connector or Java Connector credentials for BAPI calls, and stores the Ariba OAuth client ID, client secret, and API key encrypted per customer. For reads, it submits Ariba async reporting jobs filtered by a sliding time window, polls via jobId until complete, and paginates results. For writes to ECC, it calls BAPI_ACC_DOCUMENT_POST to post invoice journals, BAPI_VENDOR_CREATE for new vendors, and BAPI_VENDOR_CHANGE for updates, then commits via BAPI_TRANSACTION_COMMIT to lock in the changes. Vendor mapping is performed before GL posting so every line item references an ECC vendor that exists. Ariba's one-hour OAuth token is cached with refresh-before-expiry logic so credentials do not expire mid-job. ECC's RFC_READ_TABLE is polled on a schedule for vendor changes to sync the opposite direction. Every document carries a jobId or REF_DOC_NO external key to detect duplicates on retry and allow replay without creating duplicate posts.

A real-world example

A mid-sized discrete manufacturing company runs SAP ECC on premises for finance, procurement, and production, and uses SAP Ariba in the cloud for strategic sourcing, supplier management, and invoice aggregation across global facilities. Before the integration, the procurement team exported approved invoices from Ariba and manually matched them to purchase orders in ECC before posting to the general ledger, a time-consuming process that created month-end bottlenecks. Vendor master changes had to be synchronized by hand whenever a new supplier was on-boarded in Ariba. With SAP ECC and SAP Ariba connected, invoices flow automatically into the GL allocated to the correct cost center per PO, and new vendors in Ariba are created in ECC without manual entry. Three-way match (PO-receipt-invoice) now completes in the same systems without re-keying.

What you can do

  • Read invoices from SAP Ariba and post them into SAP ECC's general ledger via BAPI_ACC_DOCUMENT_POST, allocated to the GL account and cost center on the matching purchase order.
  • Synchronize vendor master data bidirectionally: create new Ariba suppliers in ECC via BAPI_VENDOR_CREATE and update existing vendors via BAPI_VENDOR_CHANGE.
  • Map Ariba purchase orders to ECC PO documents (BAPI_PO_CREATE1, BAPI_PO_CHANGE) so sourcing changes are visible in ECC without re-keying.
  • Manage on-premises RFC/BAPI connectivity via an agent connection and Ariba's dual OAuth plus API key authentication, with one-hour token refresh and retry on rate limits.
  • Track every invoice, vendor, and PO record with an external idempotency key so failed GL posts can be replayed without creating duplicate journal entries.

Questions

Which direction do invoices and vendors flow between SAP ECC and SAP Ariba?
Invoices flow from Ariba into ECC for GL posting. Vendors sync bidirectionally: new Ariba suppliers are created in ECC, and changes to existing vendors in Ariba are pushed to ECC. GL documents in ECC are not written back to Ariba, so Ariba remains the system of record for sourcing and invoice management while ECC is the system of record for accounting.
Does ml-connector require an on-premises agent to connect to SAP ECC?
Yes. ECC runs on premises and exposes data through RFC/BAPI, which cannot be called directly from the cloud. ml-connector requires an on-premises agent with SAP .NET Connector or Java Connector installed on the customer's network. The agent uses HTTP Basic Auth with the customer's ECC credentials to call the RFC and BAPI functions.
How does ml-connector handle Ariba's OAuth tokens and rate limits?
ml-connector caches Ariba's one-hour OAuth tokens and refreshes them before expiry so token calls do not block document retrieval. Ariba's rate limits vary by endpoint (1 to 300 per second). When a call returns HTTP 429, ml-connector backs off and retries with exponential jitter, and it submits async reporting jobs in time windows that stay within Ariba's 2,000,000 records-per-day limit.

Related integrations

Connect SAP ECC and SAP Ariba

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

Get started