SAP ECC and Paylocity integration
SAP ECC runs your on-premises finance and materials operations. Paylocity runs payroll and HR in the cloud. Connecting them ensures that employee records and labor cost journals from Paylocity are reflected in your SAP ECC general ledger and vendor master without manual re-entry. Payroll GL postings land on the correct cost centers every pay period, and your SAP ECC headcount stays in sync with Paylocity hires, changes, and terminations. ml-connector handles the complexity of bridging on-premises RFC/BAPI calls with cloud REST APIs.
What moves between them
The main flow is from Paylocity into SAP ECC. After each payroll run, ml-connector reads Paylocity's employee records and pay statements, then posts the payroll GL entries into SAP ECC's general ledger via BAPI_ACC_DOCUMENT_POST, mapped to matching GL accounts and cost centers in the ECC instance. Employee data such as hires, terminations, and position changes flows from Paylocity into SAP ECC's employee master via the appropriate BAPI calls, keeping your SAP ECC headcount synchronized with your cloud payroll system. Reference data such as cost centers and GL account numbers are validated in both directions so payroll allocations land on valid SAP ECC dimensions.
How ml-connector handles it
ml-connector stores both SAP ECC and Paylocity credentials encrypted and manages the on-premises agent connection to SAP ECC by accepting the customer's RFC gateway hostname, instance number, and credentials. It makes RFC/BAPI calls via the agent to read and write SAP ECC master data and GL documents, calling BAPI_TRANSACTION_COMMIT after every write to prevent locked documents. On the Paylocity side, ml-connector obtains an OAuth Bearer token via the client credentials flow, refreshing it automatically when API calls return 401. Because SAP ECC has no webhook system and typically runs behind a firewall, ml-connector polls Paylocity on a schedule tied to your payroll calendar for new employee records, pay statements, and GL impact. SAP ECC's RFC_READ_TABLE call is limited to 512 characters per row in the classic version, so wide tables are read via the wider BBP_RFC_READ_TABLE variant. BAPI_ACC_DOCUMENT_POST has no built-in idempotency key, so ml-connector uses the REF_DOC_NO field to detect and skip duplicate postings on retry. Every payroll GL posting and employee record carries a full audit trail and can be replayed if a downstream SAP ECC BAPI call fails.
A real-world example
A mid-sized manufacturing company runs SAP ECC on premises for production, procurement, and general ledger operations, and uses Paylocity in the cloud for payroll and HR. Before the integration, the finance team exported payroll registers from Paylocity every pay period, manually mapped each employee and cost center to SAP ECC dimensions, and re-entered the labor totals into the ECC general ledger by hand. Reconciliation during month-end close took days because the GL labor accounts did not automatically reflect the payroll changes in Paylocity. With SAP ECC and Paylocity connected, each payroll run's GL impact flows directly into SAP ECC, allocated to the correct cost centers and GL accounts, and employee records sync automatically when hired or terminated. Month-end close now begins with the labor accounts already reconciled, and the manual re-keying and variance investigation are eliminated.
What you can do
- Post Paylocity payroll GL entries into SAP ECC's general ledger via BAPI_ACC_DOCUMENT_POST after every pay run, allocated to the correct GL accounts and cost centers.
- Keep SAP ECC employee records in sync with Paylocity when employees are hired, changed, or terminated.
- Map Paylocity cost centers and GL dimensions to SAP ECC master data so payroll transactions land on valid accounts and cost centers.
- Authenticate to SAP ECC via RFC/BAPI with an on-premises agent, and to Paylocity via OAuth 2.0 with automatic token refresh.
- Poll Paylocity on a regular schedule tied to your payroll calendar, with automatic retries and a complete audit trail on every GL posting and employee record.
Questions
- Does ml-connector work with SAP ECC on premises?
- Yes. SAP ECC requires an on-premises agent running SAP .NET Connector or Java Connector on your network to relay RFC/BAPI calls from the cloud. ml-connector connects to that agent using the RFC gateway hostname and instance number you provide, and executes all reads and writes through RFC/BAPI or OData via SAP Gateway. The agent stays behind your firewall and initiates no outbound calls.
- How does the integration handle SAP ECC's requirement to commit BAPI writes?
- BAPI_ACC_DOCUMENT_POST and other write BAPIs in SAP ECC lock documents until you explicitly call BAPI_TRANSACTION_COMMIT to finalize the transaction. ml-connector always calls BAPI_TRANSACTION_COMMIT immediately after every successful BAPI write, preventing locked documents and failed retries due to locks. If ml-connector is interrupted mid-transaction, the RFC connection is dropped and the transaction is rolled back automatically by SAP ECC.
- Why does ml-connector poll Paylocity instead of relying on SAP ECC to push?
- SAP ECC has no published webhook system and typically runs behind a customer firewall, so it cannot reliably receive inbound HTTPS calls from cloud services. ml-connector polls Paylocity on a schedule tied to your payroll calendar, reading new employee records and pay statements, then writing to SAP ECC via RFC/BAPI. This is also more reliable than trying to configure optional IDoc outbound delivery in SAP ECC, which requires manual Basis configuration in WE21/WE20/SM59 and is not guaranteed to fire for all entities.
Related integrations
More SAP ECC integrations
Other systems that connect to Paylocity
Connect SAP ECC and Paylocity
Free to use. Add your credentials, ping your real systems, and see if we fit.
Get started