ml-connector
SAP ECCStampli

SAP ECC and Stampli integration

SAP ECC runs your on-premises finance operations. Stampli automates your Accounts Payable with AI-driven invoice capture and three-way matching. Connecting them keeps your AP process efficient and your general ledger current. Stampli-approved invoices post into SAP ECC without manual re-entry, vendors stay synchronized between the two systems, and your finance team gets a complete audit trail of every payment and posting. ml-connector handles the very different protocols on each side - RFC/BAPI for SAP ECC and SFTP polling for Stampli - and moves the data on a schedule you control.

How SAP ECC works

SAP ECC is SAP's on-premises ERP suite that exposes accounting, procurement, and vendor data through RFC/BAPI function modules (via an on-premises SAP .NET Connector or Java Connector agent), OData v2 REST via SAP Gateway, SOAP/WSDL, or IDoc XML HTTP. Authentication uses HTTP Basic Auth for OData and IDoc, or RFC Basic Auth for BAPI calls. Key entities include BAPI_ACC_DOCUMENT_POST for GL posting, BAPI_VENDOR_GETLIST and BAPI_VENDOR_CHANGE for vendor master, and BAPI_PO_GETDETAIL1 for purchase order details. Because SAP ECC is on-premises, it has no native public webhook system, so data is read by polling through the agent or received via IDoc push if your SAP Basis team configures outbound IDoc delivery in WE21/WE20.

How Stampli works

Stampli is an AI-powered Accounts Payable automation platform that does not publish a public REST API. File-based integration via SFTP is the only third-party path available without a formal Stampli partnership agreement. Key entities include Invoice, Vendor, PurchaseOrder, and GLAccount. Stampli's SFTP credentials (hostname, port, username, password) provide access to outbound directories where the system exports approved invoices, vendors, and payment files. Stampli has no documented public webhooks, so connectors must poll the SFTP outbound directory on a defined interval - typically every 15 minutes - to detect new files. Internal refresh rates are approximately 5 minutes for invoices and vendors, and 2 hours for purchase orders.

What moves between them

The main flow runs from Stampli into SAP ECC. Stampli-approved invoices are exported as files to its SFTP outbound directory, where ml-connector polls and retrieves them on your schedule. Each invoice is normalized, matched against the referenced PO and vendor in SAP ECC, and posted as an accounting document using BAPI_ACC_DOCUMENT_POST, allocating the invoice total to the correct GL account and cost center. Vendor master records flow the same direction, so vendor changes in Stampli are reflected in SAP ECC's vendor table. The integration runs on a polling cadence aligned with your invoice approval cycle - typically daily or twice daily depending on your transaction volume and approval throughput. GL postings are one-directional into SAP ECC; Stampli receives read-only vendor and PO reference data from SAP ECC to populate its matching rules.

How ml-connector handles it

ml-connector runs an on-premises agent using SAP's .NET Connector or Java Connector library to access SAP ECC's RFC/BAPI layer over your network. On the Stampli side, it connects to your SFTP credentials and polls the outbound directory at your configured interval - typically every 15 minutes - to detect new invoice and vendor export files. When a new invoice file is found, ml-connector parses the CSV or XML, matches the vendor and PO against live SAP ECC data using BAPI_VENDOR_GETLIST and BAPI_PO_GETDETAIL1, and posts the invoice to SAP ECC's general ledger using BAPI_ACC_DOCUMENT_POST with proper GL account and cost center allocation. Because BAPI_ACC_DOCUMENT_POST requires an explicit commit call and has no built-in external idempotency key, ml-connector tracks the Stampli file digest to prevent duplicate postings on retry, uses the invoice number as the REF_DOC_NO field in SAP ECC for duplicate detection, and calls BAPI_TRANSACTION_COMMIT after each successful posting. Vendor updates are similarly polled from Stampli's vendor export files and applied via BAPI_VENDOR_CHANGE to keep your master data current. If the RFC connection drops or a posting fails, ml-connector backs off and retries on the next polling cycle, and every record carries a full audit trail.

A real-world example

A mid-sized manufacturing company runs SAP ECC as its on-premises ERP and recently adopted Stampli to automate invoice capture and approval. Before the integration, the Accounts Payable team received approved invoices from Stampli by email or manual download, manually typed vendor names and amounts into SAP ECC, matched them to POs, and ran three-way reconciliation. Month-end close required chasing discrepancies between Stampli's approval records and SAP ECC's posted invoices, and duplicate invoices occasionally slipped through. With SAP ECC and Stampli connected, approved invoices flow directly into the general ledger on a daily schedule, vendors are automatically aligned between the two systems, and the finance team has a complete audit trail linking each Stampli approval to its SAP ECC posting. The manual re-entry step is eliminated, and month-end closes faster with fewer reconciliation exceptions.

What you can do

  • Post Stampli-approved invoices into SAP ECC's general ledger using BAPI_ACC_DOCUMENT_POST, allocated to the correct GL account and cost center.
  • Keep SAP ECC vendor master aligned with Stampli vendor changes via BAPI_VENDOR_CHANGE.
  • Match invoices against SAP ECC purchase orders and vendor records to validate before posting.
  • Handle the on-premises RFC/BAPI connection with the SAP .NET Connector or Java Connector agent, and Stampli SFTP polling on a schedule you control.
  • Track invoice file digests to prevent duplicate postings, with full audit trail and error replay on connection failure.

Questions

Does ml-connector need an on-premises agent to connect to SAP ECC?
Yes. SAP ECC is on-premises and does not expose a public REST API. ml-connector requires an on-premises agent running SAP's .NET Connector (NCo) or Java Connector (JCo) library to access RFC/BAPI function modules over your network. The agent runs on your infrastructure and communicates securely with the ml-connector control plane.
How does ml-connector poll Stampli if it has no public REST API?
Stampli offers file-based integration via SFTP. ml-connector connects to your Stampli SFTP credentials, polls the outbound directory on your defined interval (typically every 15 minutes), detects new invoice and vendor export files, parses them, and processes the records. This is the only third-party integration path available to ml-connector without a formal Stampli partnership agreement.
How does ml-connector prevent duplicate invoice postings in SAP ECC?
ml-connector tracks the digest of each Stampli export file to detect if a file has already been processed, and it uses the invoice number as the SAP ECC REF_DOC_NO field so BAPI_ACC_DOCUMENT_POST can detect duplicate submissions on retry. If a posting fails midway through, ml-connector backs off and retries on the next polling cycle without re-posting the same invoice to the general ledger.

Related integrations

Connect SAP ECC and Stampli

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

Get started