SAP ECC and SPS Commerce integration
SAP ECC runs procurement and finance for manufacturing and distribution companies. SPS Commerce connects suppliers to retail trading partners like Walmart, Target, and Amazon through a shared EDI network. Connecting the two keeps your retail purchase orders aligned with your supply chain and ensures invoices and shipping notices reach buyers without manual export or file drops. ml-connector bridges the very different connection models (on-premises RFC and cloud OAuth) and translates between SAP's native document formats and SPS's standardized RSX/JSON wrapper.
What moves between them
The main flow runs from SPS into SAP ECC. ml-connector polls SPS at configurable intervals (typically 5-15 minutes) for purchase orders and demand signals, then posts them into SAP ECC as purchase requisitions or purchase orders. When SAP documents post (invoices after delivery receipt, advance shipping notices after picking), ml-connector immediately formats them in RSX 7.7.7 and pushes them to SPS for distribution to the retail trading partners. Reference data such as vendors and materials is aligned in both directions.
How ml-connector handles it
ml-connector manages the on-premises agent connection to SAP ECC by accepting the RFC/BAPI configuration (host, port, user, password) per customer and calling RFC functions directly via the .NET or Java Connector; credentials are encrypted and the agent runs on the customer network. For SPS, ml-connector caches the OAuth token and refreshes it when a call returns 401 or when the token nears expiry. Polling from SPS uses cursor-based pagination (cursor is Base64-encoded and opaque) and respects SPS rate limits by backing off on 429 responses and retrying with exponential jitter. Documents posted to SPS must be wrapped in RSX 7.7.7 JSON envelopes per SPS schema, not sent as raw ERP data. Purchase orders flowing from SPS into SAP are mapped to SAP purchase requisitions (MM01 transaction equivalent) or direct POs, with vendor and GL account lookups performed against SAP's vendor master (BAPI_VENDOR_GETLIST) and cost center master (BAPI_COSTCENTER_GETLIST). Invoices flowing from SAP to SPS are mapped from SAP's FI documents (BAPI_ACC_DOCUMENT_POST history) and matched to the original purchase order via document reference numbers. Since SPS has no vendor-defined idempotency mechanism, ml-connector deduplicates at the document level using purchase order number, invoice number, and ASN reference, and stores state in its audit log so replays do not double-post. Every record carries a full audit trail and can be replayed if a downstream call fails.
A real-world example
A mid-sized consumer goods distributor runs SAP ECC at the head office and fulfills purchase orders from major retailers: Walmart, Target, and Amazon. Before the integration, the supply chain team exported purchase orders from each retailer's EDI mailbox or SPS portal, re-entered line items into SAP ECC by hand, then waited for picking/packing, and manually exported invoices and ASNs back to SPS for each retailer. Month-end reconciliation required chasing which orders had been invoiced to which partner and re-keying missing shipments. With SAP ECC and SPS Commerce connected, each retailer PO flows automatically into SAP, picking and packing trigger automatic ASN export to SPS, and invoicing in SAP automatically posts the invoice to SPS without manual export. The supply chain team sees a unified order pipeline, and retailers receive timely shipment notices without manual intervention.
What you can do
- Poll SPS Commerce for purchase orders and demand signals at configurable intervals and post them into SAP ECC as purchase requisitions with vendor and GL account matching.
- Automatically format invoices and advance shipping notices from SAP ECC in RSX 7.7.7 envelope format and push them to SPS Commerce for retail trading partner delivery.
- Authenticate SAP ECC via on-premises RFC/BAPI agents (NCo/JCo) and SPS Commerce via OAuth 2.0, managing token refresh and RFC connection pooling.
- Deduplicate at the document level using purchase order number, invoice number, and ASN reference to prevent double-posting on retry or replay.
- Handle SPS Commerce rate limits with exponential backoff and jitter, and maintain a full audit trail on every purchase order, invoice, and shipment notice.
Questions
- How does ml-connector connect to SAP ECC if it runs in the cloud?
- ml-connector accepts the SAP RFC configuration (host, port, user, password) and uses the SAP .NET Connector (NCo) or Java Connector (JCo) installed on an on-premises agent running on the customer network. The agent initiates RFC calls to SAP ECC and returns data to ml-connector. Credentials are encrypted, and the agent can be deployed as a container or Windows service.
- What happens when SPS Commerce rate limits kick in?
- SPS does not publish rate limits but recommends exponential backoff with jitter on 429 responses. ml-connector detects 429 errors, waits with backoff, and retries the call. If a limit is exceeded during a polling cycle, ml-connector pauses the next poll and alerts via the audit log.
- Can ml-connector sync documents that are already in SAP ECC when the integration is turned on?
- ml-connector deduplicates at the document level using purchase order number, invoice number, and ASN reference. Documents already in SAP ECC will not be re-posted to SPS. Backfill of historical documents requires a one-time manual export and upload or a custom backfill plan discussed with the ml-connector team.
Related integrations
More SAP ECC integrations
Other systems that connect to SPS Commerce
Connect SAP ECC and SPS Commerce
Free to use. Add your credentials, ping your real systems, and see if we fit.
Get started