ml-connector
SAP ECCIBM Sterling

SAP ECC and IBM Sterling integration

SAP ECC runs procurement and finance on premises. IBM Sterling manages EDI documents and partner networks. Connecting the two lets you send purchase orders from SAP ECC directly to suppliers via EDI 850, receive supplier invoices via EDI 810, and post them automatically into SAP ECC without re-keying. ml-connector handles the different authentication schemes on each side, polls for new documents on a schedule you control, and maps trading partners across both systems so data arrives in the right place.

How SAP ECC works

SAP ECC exposes vendors, purchase orders, purchase order items, GL accounts, cost centers, and invoice postings through RFC/BAPI function modules (BAPI_VENDOR_GETLIST, BAPI_PO_CREATE1, BAPI_ACC_DOCUMENT_POST) or via OData v2 REST through SAP Gateway at http://<host>:<port>/sap/opu/odata/<namespace>/<service>/. The system authenticates with HTTP Basic Auth (username and password) and requires an on-premises RFC agent running SAP .NET Connector or Java Connector to originate RFC calls. Write BAPIs require an explicit BAPI_TRANSACTION_COMMIT call to finalize changes, and documents are detected by polling on a scheduled interval since SAP ECC has no native webhook registry for outbound events.

How IBM Sterling works

IBM Sterling B2B Integrator exposes trading partners, mailbox messages, workflows, and digital certificates through a REST API at https://<b2bi-host>:<liberty-port>/B2BAPIs/svc/ and authenticates with HTTP Basic Auth or OAuth 2.0 Client Credentials against your local instance. EDI documents flow into the platform from trading partners and are accessible via polling the mailbox message queue (GET /B2BAPIs/svc/mailboxMessages/); each message carries a payload that must be extracted separately. IBM Sterling is on-premises or customer-managed cloud only, with no public SaaS endpoint, and has no outbound webhook support, so new documents are detected by polling on a regular interval.

What moves between them

The primary flow is outbound from SAP ECC to IBM Sterling suppliers. Purchase orders created in SAP ECC are polled at regular intervals, matched to trading partners already registered in IBM Sterling, and formatted as EDI 850 purchase order documents before delivery. Inbound, supplier invoices arrive as EDI 810 documents in IBM Sterling's mailbox, are polled at regular intervals, extracted, and posted into SAP ECC's general ledger via BAPI_ACC_DOCUMENT_POST, mapped to the correct GL accounts and cost centers. Vendor master records and trading partner definitions are aligned in both directions so invoices land on valid accounts and purchase orders route to the correct partner.

How ml-connector handles it

ml-connector stores the SAP ECC instance URL and login credentials encrypted, and the IBM Sterling host, port, and credentials encrypted as well. For outbound orders, ml-connector polls SAP ECC's BAPI_PO_GETDETAIL1 function on a schedule (e.g., every hour), retrieves each open purchase order with its line items, maps the SAP vendor number to an IBM Sterling trading partner ID using a maintained crosswalk, formats the data as EDI 850 ASC X12 syntax, and delivers it to IBM Sterling via a REST POST to create a new mailbox message. For inbound invoices, ml-connector polls IBM Sterling's mailbox message queue every 5 minutes, filters for EDI 810 documents from suppliers, extracts the payload, parses the line items and amounts, maps the supplier back to the SAP vendor account, creates a vendor invoice header via BAPI_ACC_DOCUMENT_POST with the GL account and cost center, adds each line as BSEG (accounting line), and commits the transaction. Since BAPI_ACC_DOCUMENT_POST has no built-in idempotency key, ml-connector uses the supplier invoice number stored in the REF_DOC_NO field to detect duplicate submissions on retry. Polling intervals can be tuned per flow depending on order and invoice frequency. Every record carries a full audit trail, including timestamp, direction, system, and result code.

A real-world example

A discrete manufacturer operates SAP ECC for procurement and general ledger and works with 12 key suppliers who send orders through an EDI clearinghouse via IBM Sterling. Before integration, the procurement team manually exported open purchase orders from SAP ECC daily, re-keyed them into email or a supplier portal, and then received invoices back via email or EDI that had to be keyed into SAP ECC by hand before month-end close. After invoices arrived, the finance team spent days matching supplier invoice amounts to purchase orders and GL postings. With SAP ECC and IBM Sterling connected, each new purchase order flows automatically to suppliers via EDI 850 within minutes of creation, and supplier invoices arriving via EDI 810 are posted automatically into the GL, pre-matched to the purchase order and cost center. The procurement team no longer re-keys orders, and finance closes the month in days instead of weeks.

What you can do

  • Poll purchase orders from SAP ECC and translate them to EDI 850 purchase orders for delivery to IBM Sterling trading partners.
  • Poll EDI 810 supplier invoices from IBM Sterling mailbox messages and post them into SAP ECC general ledger with GL account and cost center mapping.
  • Map SAP ECC vendor accounts to IBM Sterling trading partner IDs via a maintained crosswalk so orders and invoices route to the correct partner.
  • Authenticate SAP ECC via HTTP Basic Auth with on-premises RFC/BAPI agent and IBM Sterling via HTTP Basic Auth at the configured instance URL and port.
  • Deduplicate invoices using the supplier invoice number stored in SAP ECC reference document fields, with full audit trail and error replay on every record.

Questions

Which direction do purchase orders and invoices move between SAP ECC and IBM Sterling?
Purchase orders move outbound from SAP ECC to IBM Sterling suppliers as EDI 850 documents. Supplier invoices move inbound from IBM Sterling to SAP ECC as EDI 810 documents and are posted into the general ledger. Vendor master records and trading partner definitions are aligned in both directions so orders route to the correct partner and invoices land on valid GL accounts and cost centers.
How does ml-connector handle the different authentication schemes on SAP ECC and IBM Sterling?
ml-connector stores the SAP ECC instance URL and HTTP Basic Auth credentials encrypted, and the IBM Sterling host, port, and OAuth 2.0 or HTTP Basic Auth credentials encrypted. It authenticates against each system separately on each request using the stored credentials, with automatic retry and error handling for transient failures.
What happens if a supplier invoice fails to post into SAP ECC?
ml-connector tracks the failure in its audit log with the invoice number, EDI document reference, and error code. The invoice can be replayed from the IBM Sterling mailbox once the root cause is fixed (e.g., a missing GL account or cost center). The REF_DOC_NO field in SAP ECC detects duplicates on retry so the same invoice will not be posted twice.

Related integrations

Connect SAP ECC and IBM Sterling

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

Get started