SAP ALM API & Integration: Extension of SAP Cloud ALM with SAP Build (Part 1)
In this series of blog we will focus on integrating the SAP Cloud ALM API with a SAP Build application to demonstrate how to extend SAP Cloud ALM with custom functionality.
This blog describes how to setup your SAP Build environment and the connectivity to your SAP Cloud ALM tenant:
- SAP Build Apps environment setup
- Connect your SAP Build tenant to your SAP Cloud ALM tenant.
- Create Data Entity based on SAP Cloud ALM REST resources,
SAP Cloud ALM API
SAP Cloud ALM APIs make it simple to extend SAP Cloud ALM functionality to deliver new features, services and applications for your SAP application lifecycle.
SAP Build is a unified low-code solution portfolio that empowers anyone of any the skill level to automate processes and tasks with drag-and-drop simplicity.
SAP Build brings together:
- SAP Build Apps (formerly SAP AppGyver),
- SAP Build Process Automation (formerly SAP Process Automation), and
- SAP Build Work Zone (formerly SAP Work Zone and SAP Launchpad service)
into a unified development experience with new innovations to rapidly build apps, automate processes, and create business sites.
SAP Build Apps
- Build user interfaces easily: Compose enterprise-grade custom apps with drag-and-drop ease.
- Create data models and business logic visually: Build cloud services without code .
- Integrate seamlessly: Connect to SAP and non-SAP solutions securely with pre-built components, connectors, and integrations.
SAP Build environment setup
SAP Build Apps installation
For the installation of SAP Build Apps on your SAP BTP account please follow this tutorial : How to set up SAP Build Apps.
SAP Cloud ALM destination
Once all these steps are done, before creating a new application, we need to connect it to the SAP Cloud ALM API. To do this we need to create a SAP BTP destination linking to our API between SAP Build and SAP Cloud ALM.
- Connect to your SAP BTP sub-account
- Open the Destinations view
On the tool bar on the left side, you should be able to click on Connectivity, then Destinations.
Here you will be able to create the new destination that will link to our API.
- Create the Destination
After having clicked on New Destination, we must give the information that links to our API.
Here we need to enter all the fields to configure our destination.
- The <tenant> in these links should be replaced by the tenant we want access to with these API’s.
- The URL is the Service URL of the API:
- Service URL = http://<tenant>.<region>.alm.cloud.sap/api
- The Token Service URL is the URL we use to get the token that allows us to access our API
- Token URL = http://<tenant>.authentication.<region>.hana.ondemand.com/oauth/token
Once these two have been added we need to replace the Client ID with the correct client ID that will allow us to login. The same has to be done for the client secret.
All other parameters should be the same as the picture above.
The two additional properties AppgyverEnabled and HTML5.DynamicDestination should be set to true. These allow us to access this destination in our SAP Build Apps.
Once this is done you can check if the API is well connected following this tutorial: Tutorial – Testing SAP BTP Destinations
Create an application in SAP Build
Once the installation is finished, you can create a new application with SAP Build Apps to link to our API. Please follow these steps to do so: Create an Application with SAP Build Apps | Tutorials for SAP Developers
We now have a working destination that can access our API. With this done the next step is to create a link to this destination in our SAP Build application we had created previously.
Connect your SAP Build tenant to your SAP Cloud ALM tenant
Enable BTP destinations in SAP Build
- Start the SAP Build Application
To consume BTP destinations in SAP Build, we go directly to the AUTH tab at the top of the UI.
Click on Enable Authentication
After this we click on SAP BTP Authentication.
After, we should end up with an Authentication page like this :
Now we have authenticated BTP and can use BTP destinations as data sources.
Create Data Entity based on SAP Cloud ALM REST resources
Adding the destination in our SAP Build Data
Data entity are used to model the data manipulated in your SAP Build application. SAP Cloud ALM entities are based on REST access.
We need to navigate to the Data Tab at the top of our page.
On this page we should then click on Create Data Entry and open the SAP BTP Destination REST API integration page.
Once clicked on, this page should appear on your screen:
Configure Data Entity end-points
Here in the BTP destination name you can scroll through all your destinations and choose the one we have created above.
You can then enable any method you need on the side tab.
Through those methods you should be able to test to see if your API can send back data. Here we test a GET to our SAP Cloud ALM analytics provider. The answer from the API contains the providers information and answers with a status 200. This means we are connected to our API and can now use it in Build Apps to create a business application.
In the next blog, we will explain how to create a SAP Build application using different data entities.
Thanks for reading.