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.
-
php-sapb1-v2 Library Documentation v2
This library has been updated and includes bug fixes from V1.
07 November 2024 - 0 views -
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 - 4310 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 - 6812 views -
php-sapb1 Library Documentation v1
A simple and easy to use PHP library for SAP Business One Service Layer API.
16 August 2019 - 8811 views -
node-sapb1 Library Documentation v1
This article provides documentation on the SAPb1 NodeJs library.
01 August 2019 - 8539 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 - 10771 views -
PHP Service Layer Example Part 1
This article explains how to get connected to the Service Layer using PHP.
09 January 2018 - 14451 views