# SAP-Business-One-Service-Layer-SDK **Repository Path**: mirrors_SAP/SAP-Business-One-Service-Layer-SDK ## Basic Information - **Project Name**: SAP-Business-One-Service-Layer-SDK - **Description**: An SDK for SAP Business One Service Layer OData interface. Provide CRUD and filter functions by in strong type programming languages. Easy to use and efficient for partner to build Business One add-ons. - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-19 - **Last Updated**: 2026-05-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ![](https://img.shields.io/badge/STATUS-NOT%20CURRENTLY%20MAINTAINED-red.svg?longCache=true&style=flat) # Important Notice This public repository is read-only and no longer maintained. # SAP Business One Service Layer SDK Business One Service Layer SDK make it easy to access SAP Business One Service Layer OData interface. ## Introduction 1. **Strong typed, detection of errors speeds development** ![Strong Type](images/strong.png) 1. **Content assist intelligent code recommander & completion** ![Code Completion](images/intelligent.png) 1. **Logger shows what happening in detail** ![Logs](images/log.png) ## Examples 1. **Login & Logout** Usage typically looks like this, an adaptation of the canonical Retrofit sample. ```java public class Logon { static public void main(String[] argc) throws Exception { ServiceLayerClient client = login(); logout(client); } public static void logout(ServiceLayerClient client) { Logout logout = client.target(Logout.class); logout.logout(); } public static ServiceLayerClient login() throws Exception { ServiceLayerClient client = ServiceLayerClient.inSecureClient("https://xxx.xxx.xxx.xxx:50000/b1s/v1"); Login login = client.target(Login.class); Login.LoginParam param = new Login.LoginParam(); param.setCompanyDB("SBODEMOUS"); param.setUserName("manager"); param.setPassword("******"); login.login(param); return client; } } ``` 1. **Create Order** ```java public class AddOrder { static public void main(String[] argc) throws Exception { ServiceLayerClient client = Logon.login(); addOrder(client); updateOrder(client); Logon.logout(client); } private static void updateOrder(ServiceLayerClient client) { Orders orderService = client.target(Orders.class); Document document= new Document(); document.setReference1("test"); orderService.update(2, document); } private static void addOrder(ServiceLayerClient client) { Orders orderService = client.target(Orders.class); Document document= new Document(); document.setCardCode("C"); document.setDocDate(LocalDate.now()); document.setDocDueDate(LocalDate.now()); DocumentLine line = new DocumentLine(); line.setItemCode("i1"); line.setQuantity(BigDecimal.valueOf(1)); line.setPrice(BigDecimal.valueOf(1.3)); document.getDocumentLines().add(line); Document docCreated = orderService.create(document); System.out.println("Document created with Number :" + docCreated.getDocNum()); } } ```