ml-connector
SAP ECCAirbase

SAP ECC and Airbase integration

SAP ECC runs procurement, finance, and supply chain on-premises. Airbase runs accounts payable, vendor management, and spend visibility in the cloud. Connecting the two keeps your vendor master synchronized and lets your AP team work in Airbase while GL postings from vendor payments flow back into SAP ECC's general ledger without manual re-entry. ml-connector handles the on-premises RFC/BAPI agent complexity and the character encoding constraints that come with legacy ERP systems.

How SAP ECC works

SAP ECC (SAP ERP Central Component) is an on-premises ERP suite that exposes vendors, purchase orders, suppliers, invoices, GL accounts, cost centers, and materials through RFC/BAPI function modules, OData v2 REST via SAP Gateway, and IDoc XML push delivery. Clients authenticate with HTTP Basic Auth (username and password) for OData and IDoc calls, and with RFC Basic Auth for BAPI calls via the SAP .NET Connector or Java Connector. SAP ECC has no webhooks for cloud connectors, so data is read by polling through RFC_READ_TABLE or specific BAPIs like BAPI_VENDOR_GETLIST and BAPI_PO_GETDETAIL1. All writes require an explicit BAPI_TRANSACTION_COMMIT to prevent locked documents. RFC calls originate from an on-premises agent on the customer network; direct cloud-to-SAP RFC calls are not possible.

How Airbase works

Airbase is a REST API platform for spend management (accounts payable, vendor management, purchase orders, corporate cards, and GL sync). Every API call uses a static bearer token, generated in the Airbase portal and passed in the Authorization header. The API is tenant-specific at https://<company>.airbase.io and includes endpoints for bills, purchase orders, vendors, payments, and GL accounts. Airbase also supports webhooks for event notifications such as purchase_request_approved. GL accounts and subsidiaries are read-only in Airbase (the source of truth is the connected ERP); card transactions are also read-only. Airbase has no public OAuth2 documentation, and token scope is admin-level with no granular alternatives.

What moves between them

The primary flow is SAP ECC into Airbase. Vendors and purchase orders from SAP ECC's BAPI_VENDOR_GETLIST and BAPI_PO_GETDETAIL1 are polled on a schedule, transformed into Airbase vendors and purchase orders, and synced to Airbase's REST endpoints. GL postings from Airbase vendor payments flow back into SAP ECC's general ledger through BAPI_ACC_DOCUMENT_POST, allocated to the matching GL account and cost center in SAP ECC. Vendor master changes (name, address, payment terms) are read from SAP ECC and sync unidirectionally to Airbase; Airbase's vendor management is a convenience view backed by SAP ECC as the source of truth.

How ml-connector handles it

ml-connector requires a running SAP .NET Connector or Java Connector instance on the customer's network, through which it makes RFC calls to read vendor and PO data. It first polls BAPI_VENDOR_GETLIST to get the vendor master, then BAPI_PO_GETDETAIL1 for each purchase order, transforming both into Airbase vendor and PO objects. When posting GL documents back to SAP ECC, ml-connector calls BAPI_ACC_DOCUMENT_POST with the GL account number and cost center from Airbase's GL sync output, then immediately calls BAPI_TRANSACTION_COMMIT to lock in the posting; an omitted commit would leave the document in a locked state on retry. SAP ECC's RFC_READ_TABLE has a 512-character row width limit for classic tables, so wide vendor or PO records are fetched via specific BAPIs instead. ml-connector handles the SAP character encoding (ABAP_AS_CODEPAGE) to prevent garbled non-ASCII vendor names or addresses. Duplicate detection on retry uses the SAP ECC REF_DOC_NO field, since BAPI_ACC_DOCUMENT_POST has no built-in idempotency key. Polling is scheduled because SAP ECC has no webhook registry, and the on-premises agent may be behind a firewall, blocking inbound calls to Airbase.

A real-world example

A mid-market discrete manufacturing company runs SAP ECC on-premises for procurement and finance. The AP team works in Airbase for invoice management and spend visibility, but vendor master changes and PO approvals still require manual sync into Airbase via spreadsheet exports from SAP. When an AP payment runs in Airbase, the GL posting is emailed to accounting, who re-enters it into SAP's GL by hand. With SAP ECC and Airbase connected, vendor updates from SAP automatically appear in Airbase's vendor directory, PO approvals flow into Airbase without re-keying, and each month's AP GL posting from Airbase lands directly in SAP's general ledger on the correct GL account and cost center, eliminating the manual reconciliation step that previously consumed two days of month-end close.

What you can do

  • Sync vendors from SAP ECC to Airbase, including master data like name, address, payment terms, and contact details.
  • Poll purchase orders from SAP ECC and create or update matching POs in Airbase on a scheduled interval.
  • Post AP GL documents from Airbase back into SAP ECC's general ledger, allocated to the correct GL account and cost center.
  • Handle SAP ECC's on-premises RFC/BAPI agent setup, character encoding edge cases, and the BAPI_TRANSACTION_COMMIT requirement.
  • Detect and skip duplicate GL postings on retry using SAP ECC's REF_DOC_NO external key field.

Questions

What does ml-connector do if the on-premises SAP agent is offline or unreachable?
ml-connector monitors the RFC connection and surfaces the outage via its alert system. The job is queued and retried on an exponential backoff schedule until the agent comes back online. Once connectivity is restored, the sync resumes automatically from where it left off.
How are GL postings from Airbase validated before posting into SAP ECC?
ml-connector verifies that the GL account number and cost center from Airbase exist in SAP ECC's BAPI_GL_ACC_GETLIST and BAPI_COSTCENTER_GETLIST before calling BAPI_ACC_DOCUMENT_POST. If either reference is missing, the posting is rejected with a clear error so the GL mapping in Airbase can be corrected.
Can ml-connector use Airbase's webhooks for real-time sync instead of polling?
Airbase supports webhooks, but SAP ECC has no way to receive inbound webhook calls from the cloud when it sits behind a firewall on the customer network. ml-connector uses scheduled polling instead, which is reliable and does not require firewall exceptions or VPN setup.

Related integrations

Connect SAP ECC and Airbase

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

Get started