SAP ECC and Salesforce integration
SAP ECC runs your enterprise finance, procurement, and materials management. Salesforce runs sales and customer relationships. Connecting them keeps your customer and vendor master data in sync, and allows orders and invoices to flow between systems without manual re-entry. When a new account is created in Salesforce, the corresponding vendor data can be created in SAP ECC. When orders are placed in Salesforce, they post into SAP ECC as purchase orders. ml-connector handles the very different protocols and authentication models on each side.
What moves between them
The main flow is bidirectional. Vendor master records from SAP ECC are read via RFC/BAPI or OData and mapped to Accounts and Contacts in Salesforce to ensure the sales team sees current supplier information. Orders and invoices created in Salesforce are polled via Pub/Sub or GET /updated/ and posted into SAP ECC as purchase orders (BAPI_PO_CREATE1) and GL documents (BAPI_ACC_DOCUMENT_POST), allocated to the correct GL accounts and cost centers. Reference data such as company codes, plants, and material types are aligned in both directions. GL postings in SAP ECC are the source of truth for financial accounting; Salesforce is read-only on those documents.
How ml-connector handles it
ml-connector runs an on-premises agent on the customer network with SAP .NET Connector or Java Connector installed to handle RFC/BAPI calls to SAP ECC. It stores SAP ECC credentials (username + password for Basic Auth) encrypted and presents them on every RFC call. For Salesforce, it securely stores the OAuth 2.0 client credentials and refreshes the bearer token before each API call when a 401 response is received. On the SAP side, ml-connector polls vendor and customer master data via RFC_READ_TABLE or BAPI_VENDOR_GETLIST at intervals you set, transforms the records to match Salesforce Account and Contact field schemas, and checks for duplicates by matching the vendor number to an external ID field. On the Salesforce side, ml-connector subscribes to Pub/Sub CDC events for Orders and Invoices (or polls via GET /updated/ if CDC is not enabled) and translates each Order into a purchase order in SAP ECC by calling BAPI_PO_CREATE1, followed by a BAPI_TRANSACTION_COMMIT to persist the document; Invoices map to GL documents via BAPI_ACC_DOCUMENT_POST. Because SAP RFC has no idempotency key standard, ml-connector tracks each BAPI call by REF_DOC_NO to avoid duplicate GL postings on retry. OData row widths are limited to 512 characters in classic RFC_READ_TABLE, so wide tables use BBP_RFC_READ_TABLE. Character encoding must be configured at the SAP gateway (ABAP_AS_CODEPAGE) to avoid garbled text on non-ASCII data. SAP ECC RFC calls do not support rate-limit backoff the way REST does, so ml-connector caps concurrent RFC calls to 10-50 per customer. Every record carries a full audit trail so failed calls can be replayed once the downstream error is fixed.
A real-world example
A mid-sized manufacturing company runs SAP ECC for procurement and finance, and Salesforce for sales and customer management. Before the integration, the vendor team manually updated customer accounts in Salesforce with pricing and contact information from SAP ECC, a task that took several hours each quarter and often fell out of sync. Orders placed in Salesforce had to be re-entered into SAP ECC by the purchasing department, and invoices received from suppliers in SAP ECC were not visible to sales. With SAP ECC and Salesforce connected, vendor and customer masters sync automatically, so Salesforce always shows the current status from SAP. Orders created in Salesforce flow directly into SAP ECC as purchase orders, cutting manual entry and freeing the purchasing team to focus on supplier negotiation and relationship management.
What you can do
- Sync vendor and customer master records from SAP ECC to Salesforce Accounts and Contacts via RFC/BAPI or OData polling.
- Post orders created in Salesforce into SAP ECC as purchase orders using BAPI_PO_CREATE1 and BAPI_TRANSACTION_COMMIT.
- Map invoices from Salesforce to GL documents in SAP ECC, allocated to the correct cost centers and GL accounts.
- Authenticate SAP ECC with HTTP Basic Auth via an on-premises RFC/BAPI agent, and Salesforce with OAuth 2.0 client credentials.
- Poll on a schedule you control, deduplicate by external ID and REF_DOC_NO, and track every record in an audit log.
Questions
- Which direction does data move between SAP ECC and Salesforce?
- Vendor and customer master data flows primarily from SAP ECC to Salesforce so the sales team sees current supplier information. Orders and invoices flow from Salesforce into SAP ECC, where they are posted as purchase orders and GL documents. Reference data such as company codes and plants can be aligned in both directions so data lands on valid GL accounts and cost centers. SAP ECC is the system of record for financial GL postings, so Salesforce does not write back financial entries.
- Does the integration require an on-premises agent?
- Yes. SAP ECC is on-premises and communicates via RFC/BAPI, which cannot be called directly from the cloud. ml-connector deploys an agent on your network with SAP .NET Connector or Java Connector installed, and the agent initiates all RFC calls to SAP. The agent stores SAP credentials encrypted and does not expose RFC ports to the outside.
- How are vendors matched between SAP ECC and Salesforce when data syncs?
- Vendor numbers from SAP ECC are stored in an external ID field on Salesforce Accounts so the systems stay synchronized. When a vendor is updated in SAP ECC, ml-connector looks up the matching Account by external ID and updates it in Salesforce. If no match is found, a new Account is created. This prevents duplicate records and keeps both systems aligned.
Related integrations
More SAP ECC integrations
Other systems that connect to Salesforce
Connect SAP ECC and Salesforce
Free to use. Add your credentials, ping your real systems, and see if we fit.
Get started