ml-connector
SAP ECCMarketo

SAP ECC and Marketo integration

SAP ECC runs procurement and sales. Marketo runs demand generation and lead scoring. Connecting the two keeps your marketing database aligned with your source-of-truth customer and vendor records in SAP. New customers and materials added in SAP become searchable lead records in Marketo, and vendor account changes propagate without re-entry. ml-connector handles RFC polling on the SAP side and OAuth2 authentication on Marketo, with a full audit trail on every synchronization.

How SAP ECC works

SAP ECC exposes customers, vendors, materials, sales orders, purchase orders, and general ledger accounts through RFC function modules (BAPI_CUSTOMER_GETLIST, BAPI_VENDOR_GETLIST, BAPI_MATERIAL_GETLIST), OData v2 REST services via SAP Gateway, or SOAP/WSDL web services. Authentication uses HTTP Basic Auth for OData and SOAP, or RFC Basic Auth for direct BAPI calls through an on-premises agent running SAP .NET Connector or Java Connector on the customer network. SAP ECC has no native webhook system; data is read by polling RFC tables on demand or on a scheduled interval. OData services must be manually activated by the SAP Basis team and are not active by default.

How Marketo works

Marketo exposes leads, companies, opportunities, sales persons, named accounts, and custom objects through a REST API at https://<munchkin-id>.mktorest.com/rest/v1. Every call requires OAuth2 client credentials, exchanging a Client ID and Client Secret for a Bearer token with a 3600 second expiry. Marketo does not support inbound webhooks; a connector must poll the REST API using GET requests with filterType=updatedAt or the Bulk Activity Extract API with a maximum 31 day window. Opportunities and sales persons are read-only if Salesforce or Microsoft Dynamics sync is enabled.

What moves between them

The main flow is from SAP ECC into Marketo. Customer master records from SAP ECC are read via RFC polling and upserted as Marketo leads and companies on a daily or weekly schedule. Vendor records are similarly synchronized. Sales order and purchase order header data from SAP are mapped to Marketo opportunity records where appropriate. Material master changes in SAP are propagated to custom object records in Marketo so the marketing database reflects the current product catalog. Marketo is a marketing platform, not a financial system, so financial documents and GL transactions do not synchronize back into SAP.

How ml-connector handles it

ml-connector runs an on-premises agent on the customer's network or connects to a shared SAP Basis infrastructure that hosts RFC connectivity. On the Marketo side, ml-connector stores the OAuth2 Client ID and Client Secret encrypted and refreshes the Bearer token at the 1-hour expiry boundary. For each polling cycle, ml-connector reads SAP ECC customer and vendor tables using RFC_READ_TABLE or specific BAPI function calls, then maps the retrieved rows to Marketo lead and company create-or-update calls using the SAP customer number and vendor number as external identifiers. RFC_READ_TABLE has a 512-character row width limit for classic tables, so wide material records are read using BBP_RFC_READ_TABLE instead. Marketo's batch limit is 300 records per request, so large synchronizations are broken into batches. HTTP 429 rate-limit responses from Marketo trigger exponential backoff and retry. SAP character encoding is validated with ABAP_AS_CODEPAGE to prevent garbled text in non-ASCII names. Every record synchronization is logged with the source SAP key and the resulting Marketo lead ID or company ID, and can be replayed if a downstream mapping fails.

A real-world example

A mid-market B2B software company runs SAP ECC for order management and procurement and uses Marketo for demand generation and account-based marketing. Before the integration, the marketing operations team manually exported customer lists from SAP each quarter and uploaded them to Marketo, creating duplicates and missing newly acquired accounts and vendors. The sales development team worked with stale lead lists and could not see when a prospect company had just closed a large SAP purchase order. With SAP ECC and Marketo connected, customer records flow from SAP to Marketo daily, new prospects added to SAP appear in Marketo within hours, and the marketing database stays synchronized with the ERP source of truth without manual exports or reconciliation.

What you can do

  • Sync customer master records from SAP ECC to Marketo leads and companies on a daily schedule, using SAP customer number as the unique identifier.
  • Map vendor master data from SAP into Marketo account records so procurement changes are visible in marketing and sales.
  • Propagate material and product catalog updates from SAP ECC to Marketo custom objects, keeping product information aligned across systems.
  • Handle RFC polling from the on-premises SAP network and OAuth2 token refresh on the Marketo side, with encrypted credential storage.
  • Detect and recover from Marketo rate limits, RFC connection failures, and character encoding issues with automatic retries and a full audit trail.

Questions

Does the SAP ECC to Marketo connection require an on-premises agent?
Yes. RFC and BAPI calls cannot originate directly from the cloud; an on-premises agent running SAP .NET Connector or Java Connector must be installed on the customer network or a shared SAP infrastructure host. Alternatively, if OData services are activated by SAP Basis, ml-connector can read data via REST over HTTPS without an on-premises agent, though OData is not enabled by default in SAP ECC.
Which direction does data flow between SAP ECC and Marketo?
The main flow is from SAP ECC into Marketo. Customer, vendor, and material records in SAP are read on a schedule and synchronized to Marketo leads, companies, and custom objects. Marketo is a marketing platform, not a source-of-truth financial system, so data does not flow back from Marketo into SAP.
How does ml-connector handle RFC table width limits and large data sets?
RFC_READ_TABLE has a 512-character row width limit for classic tables. Wide material and customer records use BBP_RFC_READ_TABLE instead. Marketo batch requests have a 300-record limit, so large SAP extracts are split into batches and synchronized incrementally. Every batch is logged with the source SAP keys and resulting Marketo IDs for auditability and replay on failure.

Related integrations

Connect SAP ECC and Marketo

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

Get started