The service layer is an application server built on the Apache web server and can be configured in one of two ways.
Integrated Mode
In this mode, the Service Layer is installed on the same server as SAP HANA. This mode keeps the landscape simple but consumes the same resources.
Distributed Mode
In a distributed mode, the Service Layer is installed on separate machines, which provides it with more computing power.
Architecture
The Service Layer is based on a 3-tier architecture. The client communicates with the Web server using HTTP requests and the Web server communicates with the database to perform CRUD operations.
When an HTTP request is made to the Web server, the request is parsed using the OData parser. The business object(s) representing the request is loaded. The OData parser examines the HTTP method (GET/POST/PATCH/DELETE) and translates them to a callable method on the respective object(s). The data format for the HTTP request and response is in JSON.
Behind the scene, the Service Layer uses the DI API as the interface to access SAP Business One objects and services. If you have DI API experience, you will find using the Service Layer quite similar.
In the next article PHP Service Layer Example Part 1, I explain how to connect to the Service Layer using PHP.
-
Stock Transfer Part 2
In the previous article I exaplined how to transfer stock between warehouses and bin enabled warehouses. In this article, I discuss how to transfer batch enabled items.
07 August 2020 - 4242 views -
Stock Transfer Part 1
The SAP B1 Service Layer provides an API to move stock between warehouses. This article explains the construction of the JSON payload data that is posted to the StockTransfers API.
12 December 2019 - 6692 views -
php-sapb1 Library Documentation v1
A simple and easy to use PHP library for SAP Business One Service Layer API.
16 August 2019 - 8711 views -
node-sapb1 Library Documentation v1
This article provides documentation on the SAPb1 NodeJs library.
01 August 2019 - 8479 views -
PHP Service Layer Example Part 2
This article is part 2 of PHP Service Layer Example. In the previous article, I explained how to initiate an authentication request to get a Service Layer session id and route id. In this article we use these details to execute a request to retrieve a list of business partners.
25 January 2018 - 10666 views -
PHP Service Layer Example Part 1
This article explains how to get connected to the Service Layer using PHP.
09 January 2018 - 14301 views -
Updating Currency Rates
This article explains how to update currency rates using the SAP DI API.
04 July 2017 - 7480 views