SAP S/4HANA and Airbase integration
SAP S/4HANA is the system of record for vendors, the chart of accounts, cost centers, and posted supplier invoices. Airbase is the spend layer where bills, expenses, purchase orders, and card transactions are captured and approved. Connecting the two keeps Airbase coding against real SAP master data and gets approved spend back into SAP without re-keying. ml-connector pushes SAP vendors, GL accounts, and cost centers into Airbase, then reads approved Airbase transactions and posts them into SAP as supplier invoices and journal entries. It manages the OData and REST differences on each side and moves data on a schedule you control.
What moves between them
Master data flows from SAP S/4HANA into Airbase: vendors derived from Business Partners, the chart of accounts, and cost centers, so every Airbase transaction is coded against dimensions that exist in SAP. Transactional spend flows the other way: approved Airbase bills become SAP supplier invoices, and approved reimbursements and card transactions post into SAP as journal entries against the mapped GL accounts and cost centers. Card transactions and GL accounts are read-only in Airbase, so ml-connector never writes them back from SAP. Reference data is refreshed on a schedule and spend is posted as it clears approval, with the cadence set per flow.
How ml-connector handles it
ml-connector stores both credential sets encrypted. For SAP it requests an OAuth 2.0 client-credentials token against the tenant token endpoint, caches it until just before its roughly 12-hour expiry, and sends it as a bearer token; for Airbase it sends the portal-generated bearer token on every REST call. Before any SAP write it performs the mandatory X-CSRF-Token fetch and replays the request with the returned token and cookies, re-fetching on a 403. SAP vendors, GL accounts, and cost centers are mapped first so each posted Airbase bill or expense lands on a valid SAP supplier, account, and cost center, and a bill carries its PO reference so Airbase can three-way match on its side. Because SAP has no native webhooks, ml-connector polls OData with a LastChangeDateTime filter and follows the nextLink for paging; on the Airbase side it can act on webhooks such as purchase_request_approved while a scheduled poll backfills anything missed. SAP returns HTTP 429 with Retry-After under load, so requests back off and retry, and SAP rejects duplicate supplier invoices by vendor, reference, and fiscal year, which guards against double posting. Every record carries a full audit trail and can be replayed if a downstream call fails.
A real-world example
A mid-sized software company of around 300 employees runs SAP S/4HANA Cloud for finance and procurement and uses Airbase for corporate cards, employee reimbursements, and vendor bill payments. Before the integration, the accounting team exported approved bills and card spend from Airbase each week and keyed them into SAP as supplier invoices and journal entries, picking GL accounts and cost centers by hand and frequently catching coding mistakes at month-end. With SAP S/4HANA and Airbase connected, the SAP chart of accounts, cost centers, and vendor list are pushed into Airbase so spend is coded correctly at capture, and each approved transaction posts back into SAP on schedule. Close starts with AP already in the ledger and the manual re-entry step is gone.
What you can do
- Push SAP S/4HANA vendors, GL accounts, and cost centers into Airbase so spend is coded against valid dimensions.
- Post approved Airbase bills into SAP as supplier invoices and approved expenses and card spend as journal entries.
- Carry PO references on bills so Airbase can complete three-way matching on its side.
- Fetch the SAP X-CSRF-Token before every write and bridge the SAP OAuth token with the Airbase bearer token.
- Poll SAP on a schedule with backoff on rate limits, duplicate-invoice protection, and a full audit trail on every record.
Questions
- Which direction does data move between SAP S/4HANA and Airbase?
- Master data moves from SAP into Airbase, including vendors, GL accounts, and cost centers, so Airbase codes spend against real SAP dimensions. Approved transactions move the other way: bills post into SAP as supplier invoices, and reimbursements and card spend post as journal entries. Card transactions and GL accounts are read-only in Airbase, so ml-connector does not write them back from SAP.
- Does SAP need anything set up before the connection works?
- Yes. An SAP administrator must activate a Communication Arrangement for each OData service, such as the Business Partner and Supplier Invoice scenarios, which then supplies the OAuth 2.0 client ID, secret, and token URL. Without an active arrangement the service returns 404, so this is a prerequisite for any read or write.
- How does the integration handle SAP write requirements and the lack of webhooks?
- Every SAP write needs an X-CSRF-Token, so ml-connector fetches it with a GET, replays the mutating request with the token, and re-fetches on a 403. Because SAP has no native push webhooks, it polls OData on a schedule using a LastChangeDateTime filter and follows the nextLink for paging rather than waiting for a push.
Related integrations
More SAP S/4HANA integrations
Other systems that connect to Airbase
Connect SAP S/4HANA and Airbase
Free to use. Add your credentials, ping your real systems, and see if we fit.
Get started