SAP S/4HANA and IBM Sterling integration
SAP S/4HANA runs procurement and finance. IBM Sterling B2B Integrator manages EDI document translation and routing to suppliers. Connecting the two keeps your purchase orders synchronized with your supplier network and brings invoices back into the general ledger without manual re-entry. New purchase requisitions in SAP become EDI 850 purchase order messages routed through Sterling, and supplier invoices received as EDI 810 documents flow back into SAP's accounts payable, matched to the originating purchase order and cost center.
What moves between them
The primary flow is procurement documents from SAP into Sterling and then to suppliers. Purchase orders and requisitions are read from SAP S/4HANA via OData on a schedule, translated to EDI 850 format by Sterling, and routed to supplier mailboxes within Sterling for transmission. Inbound supplier invoices arrive in Sterling as EDI 810 documents and are polled from the mailbox every few minutes. ml-connector extracts the EDI payload, parses the invoice, and posts it to SAP's supplier invoice API, matching to the originating purchase order and allocating to the cost center defined in the purchase requisition. Supplier master data and cost centers are synchronized bidirectionally to keep both systems aligned.
How ml-connector handles it
ml-connector stores both SAP and Sterling credentials encrypted. On the SAP side it uses the tenant-specific OData V4 API base URL and presents the OAuth 2.0 Client Credentials token on each request, refreshing before expiry. It polls SAP for new purchase orders and requisitions using the LastChangeDateTime filter on a schedule you control. For Sterling, ml-connector polls the mailbox message endpoint every few minutes using a non-admin API user account as required by Sterling policy, and extracts each message payload via the dedicated extract endpoint. Purchase requisition lines map directly to EDI 850 detail lines with the cost center tag. When invoices arrive as EDI 810 and are extracted from Sterling, ml-connector parses the line item quantities and amounts, verifies them against the originating purchase order in SAP (to prevent duplicate posting), and posts the supplier invoice to S/4HANA using the GL account derived from the purchase category. If posting to SAP fails, the message remains in Sterling's mailbox for replay. Both systems' vendor and cost center records are checked before posting to prevent mismatches.
A real-world example
A mid-market manufacturing company runs SAP S/4HANA for procurement and general ledger, and uses IBM Sterling to manage EDI communication with 60 direct suppliers in North America. Before integration, the procurement team received purchase requisitions in SAP, manually exported them to CSV, reformatted them into EDI 850 format in an outside system, and uploaded the files to Sterling for partner transmission. When supplier invoices came back as EDI 810 messages in Sterling, the accounts payable team extracted them, manually re-entered invoice details into SAP, and then searched for the matching purchase order. Matching failures led to duplicate invoice entries and delayed month-end close. With SAP S/4HANA and Sterling connected, requisitions flow automatically into Sterling as EDI 850 purchase orders, and inbound EDI 810 invoices are parsed, matched to their purchase orders, and posted directly to the general ledger with zero manual re-keying.
What you can do
- Translate purchase orders and requisitions from SAP S/4HANA into ANSI X12 EDI 850 format and post them to IBM Sterling for supplier transmission.
- Receive EDI 810 invoices from Sterling, extract and parse the payloads, match them to originating purchase orders, and post them to SAP S/4HANA's supplier invoice API.
- Synchronize supplier master records and cost centers between SAP S/4HANA and IBM Sterling to ensure purchase order detail lines allocate to valid cost centers.
- Authenticate SAP S/4HANA with OAuth 2.0 using the tenant-specific API base URL and authenticate Sterling with HTTP Basic or OAuth 2.0 using a non-admin user account.
- Poll SAP and Sterling on schedules you define, with automatic retries, full audit trail on every document, and message replay capability if downstream posting fails.
Questions
- How does ml-connector handle the differences between SAP OData and Sterling's EDI document model?
- SAP S/4HANA exposes structured purchase order and requisition data via OData that ml-connector reads and transforms into EDI 850 segments (ST, BEG, PO1, etc.). When Sterling receives EDI 810 invoices from suppliers, ml-connector extracts the document payload from Sterling's mailbox, parses the EDI segments back into invoice line items, and maps them to SAP's structured supplier invoice API for posting. The canonical mapping is defined once and applied consistently so that cost center and GL account allocation is the same on both sides.
- What happens if an EDI 810 invoice arrives in Sterling but the matching purchase order is missing in SAP?
- ml-connector queries SAP for the purchase order before posting the invoice. If no matching purchase order exists, the message is not posted and remains in Sterling's mailbox marked for review. The audit trail shows the mismatch, and the invoice can be replayed once the purchase order is created in SAP.
- Does ml-connector require Sterling to be exposed on the internet, or can it stay behind a firewall?
- IBM Sterling B2B Integrator is on-premises or customer-managed and stays behind your network. ml-connector requires network access to the Sterling instance via VPN or DMZ, and you provide the base URL (hostname and custom Liberty port, typically not 80 or 443). All communication is HTTPS over your network, and Sterling credentials are never shared with external systems.
Related integrations
More SAP S/4HANA integrations
Other systems that connect to IBM Sterling
Connect SAP S/4HANA and IBM Sterling
Free to use. Add your credentials, ping your real systems, and see if we fit.
Get started