SAP Business One and EDI
SAP Business One EDI integration
SAP Business One has an EDI scenario in its integration framework, GLN fields and EDI sender and recipient IDs on business partners, and Peppol through SAP's e-document service. Its documentation names no X12 document, so retail X12 runs outside it. We build that part to your company: 850s into sales orders, and 855, 856 and 810 out of your orders, deliveries and invoices, mapped per trading partner, hosted and run for you.
What SAP Business One does natively
SAP Business One ships a feature SAP calls EDI. Its help says the product "supports EDI for the transfer of marketing documents to trading partners in real time", through an integration package in the integration framework. What that package exchanges, and in which standard, the documentation does not say.
| Native part | What it is | Where it stops |
|---|---|---|
| EDI scenario, package EDI.SME | Activated in Integration Packages Setup, then Enable EDI under General Settings, Services tab | Requires the integration framework, GLNs, and "a preexisting EDI scenario" agreed with the partner; no X12 or EDIFACT named |
| EDI Message fields | Sender ID and Recipient ID on the business partner, 50 characters each | Identifiers only; no envelope, control numbers or 997 |
| GLN fields | Company, warehouse and business partner address, 50 characters; branches carry one too | The company GLN is copied to all existing warehouses |
| Peppol | Electronic documents through SAP Document and Reporting Compliance, cloud edition, as access point | The Peppol network; code lists include order, delivery and invoice type codes |
| Service Layer | OData API over HTTPS on the same DI core as the DI API | The integration that calls it is not part of the product |
A US retailer still sends an X12 850 with its own version, qualifiers and IDs, and expects an 855, an 856 with its pack hierarchy and an 810 back. That part runs outside SAP Business One and writes to it through the Service Layer. SAP's steps are in its help topic Activating EDI.
This page is the SAP Business One side of our EDI integration; the system and its API are covered on the SAP Business One system page.
What sits between SAP Business One and your trading partner
Each X12 document maps to a SAP Business One marketing document or master record.
| Document | Direction | SAP Business One object | Source of the content |
|---|---|---|---|
| 850 | In | Sales order (Orders) |
The partner's file |
| 855 | Out | Sales order | Quantity per line after availability is checked |
| 856 | Out | Delivery (DeliveryNotes) with its packages |
Lines, carrier, packages and the items in each |
| 810 | Out | A/R invoice (Invoices) |
Lines, tax, freight, payment terms |
| 846 | Out | Item warehouse data | InStock, Committed, Ordered per WhsCode |
| 997 | Both | None | Kept in the integration per document |
The inbound order carries most of the mapping. The diagram follows PO 4500018236, the example on our document pages.
The business partner fields do part of the work. The partner's interchange ID goes into the EDI Sender ID on the business partner, so ISA06 123456789 resolves to CardCode C10450 without a separate table. BEG03 holds at most 22 characters and NumAtCard 100. The ship-to is an address name on the business partner, up to 50 characters, and each address has its own GLN field for partners that identify locations by GLN. An order whose ship-to does not resolve is held, not created with the default address.
The technical reality of this pair
Sessions. The Service Layer works with a session: POST /Login returns a B1SESSION cookie that expires after 30 minutes without use by default, and SAP calls the login "a heavy job". An integration that logs in per document wastes most of its time on logins; it keeps one session and logs in again on a 401.
Writes. A sales order with its lines is one POST to Orders. A morning file of 400 purchase orders is 400 calls, whatever the number of lines. SAP publishes no request rate limit for the Service Layer; the limit is the server it runs on, so the integration queues the orders and writes them at a steady pace. Before a retry, it queries open orders for that NumAtCard and customer, so an order that SAP saved before a timeout is not created twice.
Reads. A query returns 20 records per page by default. Reading 4,000 items with their warehouse data for an 846 is 4,000 divided by 20, which is 200 requests; with Prefer: odata.maxpagesize=500 it is 8. From 10.0 FP 2602 the Service Layer can send webhooks for orders, switched off per company by default and 16 per company by default; on older versions the integration polls deliveries and invoices on their update date.
Concurrency. From 10.0 FP 2102 orders, deliveries and invoices carry an ETag. An 860 change applied to an order that a user has open is sent with If-Match; if the order changed in between, SAP answers 412 with code -2039 instead of overwriting the user's edit.
What SAP Business One and X12 store differently
- Customer identity. X12 identifies the buyer by an interchange ID and a code in N1. SAP Business One uses
CardCode, 15 characters. The EDI Sender ID and Recipient ID on the business partner, 50 characters each, hold the mapping. - Item identity. The 850 orders by UPC or by the retailer's item number.
ItemCodeholds 20 characters, the item's bar code sits inCodeBars, and business partner catalog numbers hold the partner's own number inSubstitute, 20 characters, one marked as default per partner and item. - Units. The 850 orders 24
EA. SAP Business One knows the item in units of measure from a UoM group, withUoMCodeup to 20 characters. A partner that orders 2CAof 12 needs 24 PCS on the order and 2 cases back on the 855 and 856. - Price. Special prices for a business partner override other prices. With a special price of 12.95 for item 10482 and a PO price of 12.50, an 810 billed at the SAP price is 24 times 0.45, which is 10.80 above what the buyer will pay. The integration compares PO104 with the SAP price before the 855 goes out.
- Cartons. A delivery holds packages with a number, a type and the items per package, which matches the pack and item levels of an 856. The SSCC for each package has no standard field and goes into a user-defined field.
- Warehouses.
WhsCodeholds 8 characters. An 846 per ship point is built fromInStock,CommittedandOrderedper warehouse, with the formula agreed per partner: 120 in stock with 36 committed is 84 available. See which stock counts.
When it goes wrong
| What happens | What the integration does |
|---|---|
| The session expired and the Service Layer returns 401 | Logs in again and repeats the call; the document stays in the queue meanwhile |
| A write times out after SAP saved the order | Looks up NumAtCard for that customer before a retry: one sales order |
| The ship-to or an item in the 850 has no match | The order is held with the segment that failed; the rest of the file is written |
| An 860 change hits an order a user edited | 412 from the ETag check; the change is held for review, not forced |
| No 997 from the partner within its window | An alert with the control number of the document that is waiting |
We build the integration to your SAP Business One company and your trading partners, host it and run it, for a fixed build price and a monthly fee. A new partner starts as a dry run that creates nothing in SAP Business One and sends nothing, and you approve the first documents. When a partner publishes a new guide or SAP changes the Service Layer, we change the integration. The store side is covered under Shopify SAP integration; the same model on other ERPs is under Business Central EDI integration and NetSuite EDI integration. Tell us which partners you trade with.
Frequently asked questions
Does SAP Business One have native EDI?
It has an EDI scenario: the integration package EDI.SME in the integration framework, an Enable EDI setting, GLN fields and sender and recipient IDs on business partners. SAP's help describes how to activate it and tells you to check with your trading partner whether a preexisting EDI scenario is available. It names no X12 transaction set and no EDIFACT message, so a retail X12 850, 856 or 810 needs a translator and a per-partner map outside the product.
Is SAP Business One EDI the same as SAP's IDoc interface?
No. The IDoc interface, with an external EDI subsystem converting IDocs to EDIFACT or X12, belongs to SAP ERP and S/4HANA. SAP Business One is a separate product with its own API, the Service Layer, and its own EDI scenario in the integration framework.
Can EDI orders use our special prices and catalog numbers?
Yes. The order is created for the business partner of that trading partner, so its price list and special prices apply, and special prices override the other prices. Business partner catalog numbers link the retailer's item number to your ItemCode, 20 characters each side, with one marked as the default per partner and item.
Where does the SSCC of a carton go in SAP Business One?
A delivery holds packages: a number, a package type and the items and quantities in each. There is no SSCC field on the package, so the integration stores it in a user-defined field, which carries the prefix U_. SAP notes that a new user-defined field is not accessible through the Service Layer until the Service Layer is restarted.
Which API does the integration use?
The Service Layer, OData over HTTPS, where the installation has it: always on SAP HANA, and on SQL Server from 10.0 PL01. It shares the DI core with the DI API, so documents and fields are the same. The DI API is a COM library that is not built for multithreading and is used only where no Service Layer is available.
Tell us what you need
Tell us which systems you use and what needs to work better. We reply personally within one working day. We help you define the work, then agree the price and timing before you commit.
- You know the price and the timeline before you commit to anything
- We work out the connection that takes the work off your hands
- We handle the build, hosting, monitoring and maintenance
- Your team has less information to retype and fewer discrepancies to chase