Product Information
REST API for SAP Business One using SAP B1 Integration Framework – B1If
I have been a programmer practically since forever, having already used many languages, many platforms and faced some challenges. Perhaps one of the most unusual was having to learn Assembly in a few days to be able to connect a data acquisition card to a Java client-server application, which allowed interacting with equipment of a chemical laboratory via the Internet. This was in 1997, the time of dial-up internet in Brazil, when I was completing my Master in Chemical Engineering. Challenges and innovation have always motivated me.
More recently I had the opportunity to know the SAP world, and become a partner. Old wish to be able to work with the biggest and the best: SAP. As a sales channel for SAP Business One in a state in the south of Brazil, I came to know the SAP B1 Integration Framework by forwarding the destination: in my first sale of SAP B1, I ended up taking on a B1If project and need to know the tool.
Project was successfully delivered and after three years I currently use B1If almost daily, and I can say there is nothing better to integrate and expand SAP Business One. In my opinion, SAP B1If is the best tool and the best technology to optimize and accelerate the Digital Transformation journey for SAP Business One customers.
About SAP B1 Integration Framework – B1If
The SAP B1 Integration Framework is a standard SAP Business One platform, built under Apache and Java and alowing development using process flows, default adapters and XSLT language. SAP B1 Integration Framework is already used by SAP to offer the features of Dashboards and Mobile, and for out-of-box packages such as RFQ, Customer Checkout, Subsidiary and Intercompany.
SAP B1If also allows integration with other SAP applications (such as SAP S/4 HANA, SAP Business Suite, SAP Business ByDesign, SAP Ariba, SAP Concur, SAP Hybrys, SAP Customer Checkout and SAP Cloud Platform), integrations with IoT via Raspberry Pi, docker and multitenant use, and much more.
More recently SAP launched the Integration Hub, a set of preconfigured templates based on SAP B1If to integrate cloud-based business applications and services, such as Shopify, Magento, Aramex, DHL, FedEx, UPS, Fixer, Mailchimp, SendGrid, Nexmo, Expensify, automated request for quotation.
Developing passive REST API in B1If
In this post I am going to demonstrate the use of the B1If platform for the development of passive REST API that accelerate the expansion capacity of SAP Business One with apps, websites, iPaas platforms and other expert systems.
Using an innovative and disruptive design, the REST APIs allow any company to connect their ERP to business ecosystems in a simple, accessible and fast way.
Image 1 – Passive API REST developed in SAP B1If as a gate for app, site, iPaas and specialized system to connect with SAP Business One – image by Monica Nietsche and Rafael Ogeda
The API developed in this project were designed to allow companies to easily and quickly “unlock” their ERPs for true Digital Transformation, allowing them to expose business objects in a loosely coupled concept. In other words, the integration layer and the connection with the business objects are part of the management system, without the need for intervention in the ERP structure. With this we have an integration environment independent of ERP.
Available connectors
Initially, three specific connectors were developed as passive REST API: b2cAPI (ecommerce B2C), crmAPI (Customer Relationship Management) and wmsAPI (Warehouse Management System).
We also intend for 2020, in addition to expansions and new versions for the three initial connectors, to develop four more connectors: mesAPI (shop floor), accAPI (accounting), finAPI (financial) and supAPI (supply chain).
Image 2 – Passive API REST developed in SAP B1If as a gate for app, site, iPaas and specialized system to connect with SAP Business One – image by Monica Nietsche and Rafael Ogeda
Structural view of the development
The structural view of the development involves the use of loosely coupled integrations, using standard and specialized environments and tools from SAP Business One, the use of microservices and the recording of business objects using standard and reliable ERP resources. For SQL databases we use recordings via DI-API and for HANA database we use recordings via ServiceLayer.
The development carried out uses only processes and the standard data dictionary of SAP Business One, but allows flexibility for the use of both user fields (UDF) and standard fields not covered in the standard API.
Details: Basic Auth, body request/response in application/json, pagination, incremental query, monitoring (usage, database), treatment of custom fields and standard fields not used by the API, roadmap, configurable by client, complete documentation in the Postman standard, Web Monitoring Portal developed in PHP to monitor the use of the API and recordings in SAP B1.
Happy integrating!
Rafael Hernandes Ogeda
Note: all images presented here were created by Rafael Ogeda and Monica Nietsche, .
“Thank you very much Monica for sharing the dream and the realization with me. Love you!”
Related Links:
- Integration Framework for SAP Business One (B1if) – Central Blog (post blog by Mirian Rieger)
- Loosely Coupled Solutions for SMBs Topics – Central Blog (post blog by Ralph Oliveira)
- openSAP course: In Action – Integration Framework for SAP Business One
Hi Rafael, can we use B1 REST API also with SQL DB or only with HANA?
Hi Arik, how are you?
Yes, we can use B1 REST API with SQL or HANA DB. In the B1If development we identify the DB and use ServiceLayer for HANA and Di-API for SQL.
Hi
I have installed sap b1 10.00 in one server. Client saying install application in one server and integration serve in another server. Could please help me how install application server and integration server on separate separate server and also how to integrate this 3 server.
Hi my friend, how are you?
I undestood that you will have 3 servers: one for DB server (HANA), one for SAP B1 application and other for SAP B1If. This is the environment recommended by SAP: SAP B1If in a separate server.
All you need is to configure a SLD entry in SAP B1If with the connection data for the application and DB servers.
In SAP B1If we configure environments in SLD section. In SLD of type B1.9.0 you need to inform B1 and DB Server (IP and port), Company DB, DB Type and DB and SAP B1 credentials (ex.: SYSTEM and B1i users).
With the correct connection data your SAP B1If Server will access your SAP DBs/Companies in another server.
SAP B1If - SLD B1
I expected helped you.
Hi Rafael Hernandes Ogeda ,
Thank you very much I done as per your suggestion its perfectly connected to database from app and integration server but I cant find my company databases under SLD (integration framework).please check attached screen shot . please help me how to proceed further.
Hi my friend, how are you?
Maybe experts can help you better, but I think you will need to add SLD to your company databases manually.
As I know, the company databases will automatically appears only if B1If and SAPB1 application are in the same server, what isn’t your case.
Hi Rafael Hernandes Ogeda ,
Thank you very much I done as per your suggestion its perfectly connected to database from app and integration server but I cant find my company databases under SLD (integration framework).please check attached screen shot . please help me how to proceed further.
Hi Rafael Hernandes Ogeda am waiting for your response please its very urgent to me .....
Hi Laxminarayana B
I found some articles in SAP Community about SLD and Sync with tables SLSP/SLSPP:
Please, take a look.
Best regards
Hi Rafael,
Could you please share any examples of the code or detailed blogs to connect to such APIs in scenarios as you have explained? like the one in the below link.
https://help.sap.com/doc/2b9cbab793d440ccb4099524713d48a7/9.0/en-US/B1iF_2_0_Building_Scenarios.pdf
Hi rajesh, how are you?
The link of your example reference ("Integration Framework 2.0 for SAP Business One Example – How to Build a Scenario") is the step-by-step to develop an inbound API HTTP REST service that insert SalesOrder/17 in SAPB1 using SAP B1If 2.0 and DI-API connector.
In our APIs we just used similar example for SAP B1If 1.x and build a complete set of API HTTP REST custom service endpoints to communicate with SAPB1 databases (SQL using B1DI or HANA using B1SL). Our APIs are an alternative for using directly SAP B1 ServiceLayer API.
So, we have now a complete API HTTP REST custom for SAP Business One that easily permit connect with specialist plataforms as Ecommerce, Marketplace, CRM, Logistics, Financial, Production, etc. To connect with these APIs we also develop scenarios packages in SAP B1If 1.x called RPA, that connect the two system enolved in an integration: ERP SAPB1 <> plataform
Example of code to connect to these API is the same example to connect with any other API HTTP REST: using atom HTTP call as showed in page 8 of your link (with HTTPOutbound instead HTTPInbound). For more details, please call me in private. 😉
Observation: we will lauch the version SAP B1If 2.0 of our APIs in next year/2023.
Hi Rafael,
Could you please share any examples of what you just mentioned. Like how to I connect to a mailchimp API key in XSLT of a scenario.
Hi my friend
The main objective of this article is demonstrate how use SAP B1If to create and deploy passive HTTP REST to be used to easily connect with SAP Business One. Not to demonstrate how to connect with third party API.
Each plataform (ie Mailchimp) has its own details for connecting and I suggest you open a specific article with your specific doubt.