SAP integration
Connect SAP Business One: for carriers, approved demurrage charges become A/R invoices; for fuel buyers, they become A/P invoices. Payments are kept in step both ways. SAP S/4HANA connects to check access only.
Pro plan
Early access
Supported versions
SAP Business One
- Service Layer (
/b1s/v1) - Test: logs in, reads company info, logs out
- Carriers: A/R invoices and incoming payments. Fuel buyers: A/P invoices (or drafts) and outgoing payments
SAP S/4HANA
- OData with Basic authentication
- Test: reads the
API_BILLING_DOCUMENT_SRVservice document - Connection check only. Send invoices as X12 210s (EDI) or with a scheduled CSV export (Settings > Data & exports)
How sync works (Business One)
What syncs
- One invoice per approved record, one line, with the record number (DMR-…) as the customer reference number
- The customer: found by name, or created the first time as a business partner with a card code starting with DM
- Payments made through Demurly (card, or confirmed paid outside Demurly) are recorded as an incoming payment against the invoice
- An invoice paid in SAP marks the record paid in Demurly (checked every 10 minutes)
Safeguards and controls
- Nothing is created twice: a retry finds what was already made
- A payment that came from SAP isn't sent back
- If the invoice total in SAP differs from the approved amount (for example, tax from the item's settings), the sync fails with a message until you fix the invoice; then click Retry
- Turn off Invoice approved records automatically to stop new invoices; payments for invoices already sent still sync
- Records approved before you connected can be invoiced with Invoice them
- Recent activity, with Retry, is shown in Settings > Connected systems
SAP Business One setup (carriers)
Gather Service Layer information
You'll need:
- Service Layer server URL without the path (e.g.,
https://your-server:50000); Demurly adds/b1s/v1 - Company database name
- SAP B1 username and password
- The server must be reachable from the internet over HTTPS; internal and private addresses are refused
Use a trusted certificate
The Service Layer must present a certificate from a public certificate authority. Self-signed certificates fail the connection test.
Connect in Demurly
- Go to Settings > Connected systems
- Click Connect on the SAP card
- Choose SAP Business One (Service Layer)
- Enter the server URL, company database, username and password
- Click Save and Test
Set invoice settings
- In Settings > Connected systems, open the SAP invoice settings
- Enter the Item code (required): the item demurrage is billed as
- Enter the Payment account (required): the G/L account Demurly payments are recorded to
- Save
A payment is recorded as an incoming payment by bank transfer to the payment account, with the record number as the transfer reference.
For fuel buyers: bills in SAP Business One
Free for fuel buyers
What syncs
- On approval: an A/P invoice (service type) for the supplier you mapped, dated the day you approved it, with the carrier's invoice number as Vendor Ref. No., one line on your expense account for exactly the approved amount, and the record number in the journal remarks
- With Save bills as drafts on: an A/P invoice draft that someone adds in SAP; Demurly follows the posted invoice after that
- The carrier's invoice PDF, attached to the invoice
- Paid in Demurly: an outgoing payment (bank transfer) from your payment account, applied to the invoice
- Paid in SAP: within about 10 minutes the charge shows as paid outside Demurly, with the SAP payment number, and the carrier confirms the money arrived. An invoice closed by a credit memo isn't treated as paid
- Each record says where it is: "In SAP Business One as A/P invoice 311 (draft)"
What doesn't sync
- Tax codes: if SAP adds tax, the total won't match and the sync stops with a message until you fix the invoice
- A draft has no payment until it's added as an A/P invoice in SAP
- SAP S/4HANA: connection check only
What SAP Business One needs
- A B1 user whose license covers A/P invoices and outgoing payments, with authorizations for business partners, A/P invoices and their drafts, outgoing payments and attachments
- Two G/L accounts, both required: the Expense account bills post to, and the Payment account (bank or clearing) Demurly payments come from
- For the PDF: an attachments folder the Service Layer can write to (General Settings > Path)
Set it up
- Connect SAP Business One as in steps 1 to 3 above.
- On the SAP Business One bills card, enter the expense account and payment account (both marked required).
- Map each carrier to its supplier (search by name or card code), or turn on Create vendors (new suppliers get a card code starting with DM).
- If A/P invoices go through an approval procedure in your company, turn on Save bills as drafts.
- Charges approved before you connected: Bill earlier charges on the bills card. Pick a start date (the day you connected, unless you change it) and Demurly shows how many it will bill first. Charges you already paid are left out unless you tick Also bill charges you already paid; then each is billed with its payment recorded.
SAP S/4HANA setup
Connecting S/4HANA only checks access; Demurly doesn't create invoices there. To get records into S/4HANA, send them as X12 210s (EDI) or with a scheduled CSV export (Settings > Data & exports).
Create Communication Arrangement
- Open the Communication Arrangements app
- Create an arrangement whose scenario exposes the Billing Document API (
API_BILLING_DOCUMENT_SRV) - Assign a communication user with a password (Basic authentication)
Configure in Demurly
- Go to Settings > Connected systems
- Click Connect on the SAP card and choose SAP S/4HANA (OData)
- Enter:
- S/4HANA host URL (Demurly calls
/sap/opu/odata/sap/...under it) - Communication user name and password
- S/4HANA host URL (Demurly calls
- Click Save and Test
Security
- Service Layer session login (B1) or Basic authentication over HTTPS (S/4HANA)
- Credentials encrypted at rest with AES-256-GCM
- The B1 test logs out of the Service Layer session when it finishes
- Configure and disconnect events are logged in Connection History
Common issues
- Login failed (B1): Check the username, password and exact company database name (case-sensitive).
- 401/403 (S/4HANA): Check the communication user's password and that the arrangement is active and includes the Billing Document API.
- Timeout or connection refused: The server must be reachable from the internet over HTTPS.
Need help?
If the connection test fails and the error isn't clear, contact us with the message shown.
Contact support