ml-connector
SAP ECCTaxJar

SAP ECC and TaxJar integration

SAP ECC runs order-to-cash and finance across your company. TaxJar calculates real-time sales tax rates, manages tax jurisdiction rules, and automates tax filing. When the two are connected, your sales orders flow from SAP into TaxJar for instant tax calculation at checkout, and completed transactions post automatically for state tax reporting. This eliminates manual rate lookups, prevents tax miscalculations, and keeps your compliance fresh with no re-keying.

How SAP ECC works

SAP ECC is an on-premises ERP suite that exposes business entities through RFC/BAPI function modules and OData v2 via SAP Gateway at http://<host>:<port>/sap/opu/odata/<namespace>/<service>/. Authentication uses HTTP Basic Auth for OData and RFC Basic Auth for BAPI calls. Key entities include sales orders (EKKO, EKPO), customer masters (KNA1, KNB1), materials (MARA), and GL accounts (SKB1). SAP ECC has no native webhook system, so data is read by polling via RFC_READ_TABLE on a schedule you define. Write operations require explicit BAPI_TRANSACTION_COMMIT calls and an on-premises RFC agent (SAP .NET Connector or Java Connector) running on your network, since RFC cannot originate directly from the cloud.

How TaxJar works

TaxJar exposes tax calculations, transaction reporting, nexus tracking, and tax rates through a REST API at https://api.taxjar.com/v2/, authenticated with a simple API key token via the Authorization header. Key endpoints include POST /taxes for real-time tax calculations, POST /transactions/orders for order reporting, and GET /nexus/regions for jurisdiction tracking. TaxJar is cloud-only and poll-based - it does not publish webhooks or push events to external systems. Merchants generate API tokens from their TaxJar account dashboard, with separate sandbox tokens available on Professional plans and above for testing before production use.

What moves between them

The flow is bidirectional. Sales orders and invoices are read from SAP ECC via RFC polling and sent to TaxJar as transaction records for real-time tax calculation and state reporting. Tax rate data, including nexus rules and regional rates, flows back from TaxJar to SAP so that order entry teams see the current tax rules before confirming a sale. Customer exemption status in TaxJar also syncs back to SAP customer records so that tax-exempt orders are handled correctly at order entry.

How ml-connector handles it

ml-connector runs an on-premises RFC agent configured with SAP Basic Auth credentials and uses RFC_READ_TABLE to poll EKKO and EKPO (sales order header and line items) on a scheduled interval - typically nightly after order entry closes, or at a cadence that matches your tax filing frequency. For each order, it extracts the ship-to address and material code, looks up the tax category mapping from a ml-connector reference table, then POSTs the order to TaxJar's /transactions/orders endpoint with customer location, line items, and the mapped tax category. TaxJar returns the calculated tax amount for each jurisdiction where the sale is taxable. ml-connector stores the TaxJar transaction ID in the SAP order record (custom field) for audit and idempotency on retry. On the return path, ml-connector polls TaxJar's /nexus/regions and /rates endpoints daily and writes the tax rate dimension tables back to SAP via BAPI_MATERIAL_CHANGE or a custom IDoc HTTP port so that order entry screens show current rates. Since TaxJar does not support webhooks and SAP has no outbound webhook registry, all sync is poll-initiated. The RFC agent handles Basic Auth refresh and connection pooling; ml-connector encrypts the agent credentials and retries failed RFC calls up to three times before logging to the audit trail.

A real-world example

A mid-market B2B distributor runs SAP ECC for order management and finance across five regional warehouses. The company sells into multiple states and has complex nexus rules due to recent warehouse openings. Before the integration, the sales team looked up tax rates manually from a spreadsheet, entered them into order confirmations by hand, and accountants reconciled tax liabilities after month-end close by re-querying TaxJar. With SAP ECC and TaxJar connected, each sales order automatically calculates the correct tax based on ship-to address and product category, and ml-connector posts the completed orders to TaxJar so state tax reports generate automatically without manual data entry. Month-end close now starts with tax liability already reported, and rate changes propagate to SAP within hours of a nexus update.

What you can do

  • Poll sales orders and invoices from SAP ECC via RFC and send them to TaxJar for real-time tax calculation and transaction reporting.
  • Map SAP materials and sales order line items to TaxJar tax categories so each sale is taxed in the correct jurisdiction.
  • Sync tax rates, nexus rules, and regional jurisdiction data from TaxJar back to SAP so order entry teams see current rates before order confirmation.
  • Authenticate SAP ECC with an on-premises RFC agent and TaxJar with token-based API key, managing credentials encrypted at rest.
  • Track order-to-transaction mapping in SAP records and audit all tax calculations, with retry logic for failed API calls.

Questions

How does ml-connector handle SAP ECC's on-premises architecture and lack of native webhooks?
ml-connector deploys an on-premises RFC agent (SAP .NET Connector or Java Connector) on your network to read sales orders via RFC_READ_TABLE on a scheduled interval. Since SAP ECC has no webhook registry and TaxJar does not publish webhooks, all sync is poll-initiated - typically nightly after order entry closes or at a cadence tied to your tax filing frequency. The RFC agent manages connection pooling and Basic Auth refresh automatically.
What happens when a sales order in SAP is posted to TaxJar and then modified or cancelled?
ml-connector stores the TaxJar transaction ID in the SAP order record (a custom field) so that retries on the same SAP order reuse the TaxJar transaction ID via an idempotency key. If a SAP order is cancelled, ml-connector can optionally POST a refund transaction to TaxJar to reverse the tax calculation. If an order is modified after posting, ml-connector re-posts it with the updated line items and ship-to address; TaxJar will recalculate tax based on the new order data.
How are tax categories and materials mapped between SAP and TaxJar?
ml-connector maintains a reference table that maps SAP material codes (MARA) and product categories to TaxJar's supported tax categories (e.g., Physical Goods, Digital Products, Service). Order entry teams assign the material code in SAP, and ml-connector looks up the mapping at order post time. If a material is missing from the map, ml-connector defaults to Physical Goods and logs an alert so the mapping can be updated before the next order batch.

Related integrations

Connect SAP ECC and TaxJar

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

Get started