ml-connector
SAP S/4HANARamp

SAP S/4HANA and Ramp integration

SAP S/4HANA runs your finance and procurement. Ramp manages corporate spend, cards, and bills. Connecting the two keeps your general ledger synchronized with actual spend. Bills created in Ramp flow into SAP S/4HANA as journal entries, allocated to the correct cost centers and GL accounts. Vendors are kept in sync, and approvals and payment status feed back to Ramp. ml-connector handles the OAuth dance on both sides and moves the data on your terms.

How SAP S/4HANA works

SAP S/4HANA in Cloud Public Edition exposes suppliers, purchase orders, supplier invoices, GL accounts, cost centers, and journal entries via OData V2 and OData V4 REST APIs. Each customer instance has a tenant-specific base URL managed by SAP. Calls authenticate with OAuth 2.0 Client Credentials using a Communication Arrangement defined by your SAP admin. Tokens are short-lived and must be cached and refreshed before expiry. SAP has no native webhooks, so transaction and GL data are read by polling with a filter on LastChangeDateTime or delta tokens. GL Account and Cost Center master data are read-only and maintained in SAP only.

How Ramp works

Ramp is a corporate spend management platform exposing transactions, bills, vendors, GL accounts, accounting dimensions, departments, and purchase orders through REST JSON APIs at https://api.ramp.com/developer/v1. Every API call requires OAuth 2.0 Client Credentials with a 10-day token lifetime. Ramp supports real-time push webhooks for bills, transactions, vendors, and payments with HMAC-SHA256 signature verification. Bills can be created, updated, and marked paid via the API. Vendors are typically created implicitly through bills or a separate intake flow. GL Accounts and custom accounting dimensions are accessible but write operations on GL require both read and write scopes.

What moves between them

The main flow is Ramp into SAP S/4HANA. When a bill is created or marked paid in Ramp, ml-connector receives the webhook event, retrieves the vendor and line-item details, and posts a journal entry into the S/4HANA GL allocated to the cost center and GL account mapped from Ramp's accounting dimensions. Vendor master records sync bidirectionally so the two systems maintain a consistent supplier list. GL account and cost center reference data is read from S/4HANA and used to validate that Ramp transactions map to valid dimensions before posting. Because SAP S/4HANA is pull-only for GL Line Items, the integration also polls periodically to catch any changes made directly in the ledger.

How ml-connector handles it

ml-connector stores both SAP and Ramp credentials encrypted and handles OAuth token refresh for each system independently. For SAP S/4HANA, it reads the tenant URL and Communication Arrangement details from your configuration, exchanges credentials for a bearer token, and caches the token until near expiry. For Ramp, it uses Client Credentials flow with a 10-day token lifetime. The integration receives Ramp bill and payment webhooks via HTTPS, verifies the HMAC-SHA256 signature, and processes the event. On bill creation, it reads the vendor, line items, and accounting dimensions from Ramp, maps each line to an S/4HANA cost center and GL account, and posts the journal entry. Cost centers and GL accounts are validated against SAP master data first; if a mapping is missing, the transaction is queued for replay once the mapping is added. Ramp's vendor intake is implicit, so new vendors surface via bill events; the integration syncs them to S/4HANA as suppliers. Because S/4HANA is read-only for GL postings, ml-connector never writes back to SAP; it reads GL to validate mappings and detect conflicts. Every transaction carries a full audit trail linking the Ramp bill ID, the S/4HANA journal entry number, and the timestamp.

A real-world example

A mid-market professional services firm runs SAP S/4HANA for accounting and procurement, and uses Ramp for corporate cards, bill pay, and vendor payments across multiple offices. Before the integration, the accounting team received Ramp bills, manually keyed them into SAP with project and cost center allocations, and waited for GL posting to verify the amounts matched. Reconciliation was tedious because Ramp and SAP often disagreed on vendor names or payment status. With Ramp connected to SAP S/4HANA, each approved bill automatically posts to the GL when paid, allocated to the correct project cost center in SAP. Vendors are created once and stay in sync. The finance team no longer re-keys bills, and month-end reconciliation is faster because Ramp payments and S/4HANA GL are already aligned.

What you can do

  • Post Ramp bills into SAP S/4HANA as journal entries with cost center and GL account allocation.
  • Keep vendor master data synchronized between Ramp and SAP S/4HANA.
  • Map Ramp accounting dimensions and departments to SAP cost centers and GL accounts.
  • Authenticate both SAP S/4HANA with OAuth 2.0 Communication Arrangements and Ramp with Client Credentials.
  • Receive Ramp webhook events for bills and payments, verify signatures, and process transactions with full audit trail.

Questions

Which direction does data move between SAP S/4HANA and Ramp?
The main flow is Ramp into SAP S/4HANA. Bills and payments created in Ramp are posted as journal entries into the S/4HANA GL, allocated to the matching cost centers and GL accounts. Vendor master data syncs in both directions. SAP GL postings are read-only, so ml-connector does not write financial entries back to Ramp.
How does the integration handle OAuth token refresh for both systems?
ml-connector caches OAuth tokens and monitors their expiry. For SAP S/4HANA, the Communication Arrangement defines the token endpoint and scopes; tokens are typically valid for 12 hours and are refreshed before expiry. For Ramp, Client Credentials tokens are valid for 10 days. Both systems are handled independently so a refresh failure in one does not block the other.
What happens if a bill in Ramp has a cost center or GL account that does not exist in SAP S/4HANA?
ml-connector validates all cost centers and GL accounts against SAP master data before posting. If a mapping is missing or invalid, the transaction is queued for manual review and replay. You can add the missing cost center or GL account in SAP, update the mapping in ml-connector, and replay the transaction without re-entering the bill in Ramp.

Related integrations

Connect SAP S/4HANA and Ramp

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

Get started