Skip to content

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:

OData exists in two versions: 3 and 4.

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:

  1. Call the Login endpoint -> you will get a session cookie

  2. Call other enpoints, providing the session cookie

sapb1-session-cookie.png

Master Detail Relationships

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

sapb1-master-detail.png

Inspection

In SAP B1, you can check out the fields that you need from the client like so:

  1. go to the respective card

  2. hover over the field

  3. check the module (e.g. OHEM)

  4. check the attribute (e.g. dept)

sapb1-inspect.png

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:

sapb1-mapping.png