SAP BusinessOne (SAP B1)
Introduction
SAP Business One is intended for "smaller" companies of up to 500 seats. It is similar to Dynamics 365 BC.
Our #indu and #cgk projects are on B1.
SAP B1 exists in two flavors:
- SAP B1 for SAP Hana
- SAP B1 for MS SQL Server
SAP B1 does not have ABAP, but it also supports modules.
OData API
We access B1 through the so-called Service Layer. You'll find a documentation here:
- Service Layer: https://sap.highwaytwo.com/Working_with_SAP_Business_One_Service_Layer.pdf
- OData: https://help.sap.com/doc/138a52ba164b4c3197ff4d19621400a3/10.0/en-US/4e330dc617254c4e942ba42116bff90c.pdf
OData exists in two versions: 3 and 4.
- OData 3 API Reference: https://sap.highwaytwo.com/Service%20Layer%20API%20Reference.html
- OData 3 Postman collection here: https://documenter.getpostman.com/view/1516368/SzYbyxa4#de26f81e-62cf-43b3-9a14-0df8401c439f
We have a connector py-sapb1. It uses the OData 4 API. Check out our own Postman collection.
Authentication
The authentication is done with a session cookie. The flow is:
-
Call the
Loginendpoint -> you will get a session cookie -
Call other enpoints, providing the session cookie

Master Detail Relationships
A specialty in the OAPI is that master detail relationships always come together. For example, for the Invoices endpoint.

Inspection
In SAP B1, you can check out the fields that you need from the client like so:
-
go to the respective card
-
hover over the field
-
check the module (e.g. OHEM)
-
check the attribute (e.g. dept)

This shows the underlying database structure.
The Module mapping to endpoint has to be guessed (OHEM -> EmployeesInfo)
Also, the attribute mapping has to be guessed:
