How to consume SAP Business One API Hub APIs and a Cloud Foundry backend from a SAP UI5 app
At the 2018 SMB Innovation Summits our team Solution Architects provided several sessions around the development of SAP Business One loosely coupled extensions on the SAP Cloud Platform. The purpose of loosely couple solutions is to separate and protect the SAP Business One digital core from partner solutions. The SAP Business One solution runs then in a different environment (either OnPremise or OnDemand) than the partners extensions.
In this blog I will like to share with you the details of the sample extension app proposed in one of the SMB Summits Hands-on exercises. By following the concepts and documents provided in this blog you will be able to implement the sample exercise extension app on your own environment!
To understand the features implemented please review the following video:
The sample extensions app does the following operations:
- Creates a SAPFiori/SAPUI5 application (1) connecting to SAP Business One Service Layer via SAP API Business Hub (2)
- Implements and deploy a server side NodeJS application (3)
- Consumes the server side NodeJS application from the SAPFiori application (1)
Loosely couple extensions
You can see the application is loosely coupled from SAP Business One, fully deployed on the SAP Cloud Platform, while SAP Business One is running in an OnPremise environment or in a different cloud. This architecture facilitates the update process of the external extensions while the SAP Business One core environment remains unchanged and secured.
Please check the blog Moving your SAP Business One on-premise solution to cloud to better understand the advantages of loosely coupled extensions development for SAP Business One.
SAP Cloud Platform
SAP Cloud Platform is an open platform as a service (PaaS) which provides customers and partners with in-memory capabilities, core platform services, and unique business services for building and extending personalized, collaborative, mobile-enabled cloud applications. SAP Cloud Platform is designed to accelerate digital transformation across your business by enabling your organization to build the exact application you need more quickly, easily, and economically – all without the requirement of maintaining or investing in on-premises infrastructure. Based on open standards, SAP Cloud Platform offers complete flexibility and control over your choice of clouds, frameworks, and applications.
SAP API Business Hub
Another important concept is the SAP API Business Hub service on SAP Cloud Platform. SAP API Business Hub allows you to explore, discover and test APIs in the SAP API Sandbox as well as build sample apps with SAP WebIDE.
With SAP API Business Hub, you can develop and test sample applications connecting to different SAP APIs, including of course SAP Business One APIs without requiring an SAP Business One server to be deployed.
SAP Business One exposes 3 SAP API Business Hub packages as of today and many other packages will follow very soon:
- SAP Business One – Sales
- SAP Business One – Inventory
- SAP Business One – Business Partners
Cloud Foundry & NodeJS
The server side of our exercise is developed with NodeJS and deployed in SAP Cloud Foundry.
SAP Cloud Platform leverages Cloud Foundry as the open technology for application development as well as for multi-cloud deployment scenarios.
Read the following blog to better understand SAP Cloud Foundry:
Official documentation can be found here:
SAP Fiori/SAP UI5
This sample exercise app has been developed with SAP WebIDE Full Stack SAP UI5 templates.
You can find more details about SAP UI5 at the openSAP course Developing Web Apps with SAPUI5 as well as in our SAP Business One Extensibility eLearning playlist in YouTube (many sessions around SAP Business One Extensibility topics including SAP UI5 and SAP Fiori).
Update July 2018
SAP WebIDE offers also SAP Fiori templates to develop your applications. In the exercise we used SAP UI5 templates as at the time of the Summits only SAP UI5 template supported OData version 4 (previously only OData v2 was supported) and as you know SAP Business One Service Layer supports OData v3 and v4.
Currenlty SAP WebIDE supports OData v4 on the SAP UI5 and SAP Fiori Worklist Application OData V4 templates, just try them and let you guide through the wizard to select either SAP Business One API Business Hub APIs or directly your SAP Business One Service Layer backend!
Test it by yourself!
My suggestion for you on this blog is to follow step by step the document https://github.com/B1SA/B1_SCP_HandsOn/blob/master/HandsOn_SCP_Instructions.pdf and implement this application in your own SAP Cloud Platform account. This document will provide all required details to implement this exercise including instructions on how to create an SCP trial account.
I hope you will enjoy implementing this example on your own environment.
And don’t forget to let us know your feedback!!!
PS: This blog will be followed by many others proposing different examples around the development of loosely coupled solutions for SAP Business One, stay tuned!