Skip to Content
Technical Articles
Author's profile photo Maria Trinidad MARTINEZ GEA

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!

Goal

To understand the features implemented please review the following video:

Architecture

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)

 

Key concepts

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

The sample extension application is fully deployed on the SAP Cloud Platform and takes advantage of the SAP Cloud Platform capabilites.

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:

https://blogs.sap.com/2017/06/13/enterprise-is-the-new-black/

Official documentation can be found here:

https://cloudplatform.sap.com/cloudfoundry.html

 

SAP Fiori/SAP UI5

This sample exercise app has been developed with SAP WebIDE Full Stack SAP UI5 templates.

SAPUI5 and its open-source variant OpenUI5 help you build enterprise-ready Web apps that are responsive to all devices. The JavaScript UI library and development toolkit contains many feature-rich controls and implements the award-winning SAP Fiori user experience. It helps developers ease and speed up the development of full-blown HTML5 Web applications.

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).

Important update 19/03/2021: SAP Business Application Studio is the next generation of SAP WebIDE, please use SAP Business Application Studio instead of WebIDE.

Check this blog for more details: SAP Business Application Studio and SAP Web IDE Full-Stack

And the following blog and tutorial to start creating your first Fiori apps with SAP Business Application Studio:

As you continue reading this blog please translate WebIDE to SAP Business Application Studio when required. The same Fiori templates proposed by WebIDE are available as SAP Business Application Studio templates.

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!

Assigned Tags

      4 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Caio Silva
      Caio Silva

      Hello Maria!

      I am using SAP WEB IDE Local and i want to connect my HANA SERVER, that is in the same network.

      How can i do this? Is it possible?

      My enviroment is on demand, what is the best IDE for to create sap ui5 app?

      Tks a lot.

      Best regards!

       

       

      Author's profile photo Gregor Wolf
      Gregor Wolf

      Dear Maria,

      should the Business One API's still be documented at https://api.sap.com/?

      Best regards
      Gregor

      Author's profile photo Gregor Wolf
      Gregor Wolf

      Hi Maria,

      I was able to solve the issue. At least 4 SAP Business One OData API's can be found using:

      https://api.sap.com/search?filter=(Products%20eq%20(SAP%20Business%20One))

      Best regards
      Gregor

      Author's profile photo Mel Dodd
      Mel Dodd

      Hi Trinidad,

      I have been following the instructions carefully in HandsOn_SCP_Instructions.pdf.

      When try to run the application for the first time (page 17) I get the following error in a black window on the upper right.

      Could not run module "/mta_B1SL_Summit2018/mta-b1sl-summit2018-approuter".

      It seems to be trying to run the server side app at that point.

      Do you have any suggestions to resolve this?

      Thanks very much.

      Regards,

      Mel Dodd