Acorel
To Acorel.nl
Acorel background

SAP BUILD Quirks!

Yogesh Sohanee, 27 March 2024

SAP Build has been around for quite a good amount of time and SAP has introduced a sizeable amount of updates since its takeover from Appgyver which resonates its standard structuring under SAP BTP hood. 

BUILD has been termed as LowCode-NoCode solution but indeed there has been some quirks which can be considered as crucial while developing the solution with BUILD. This is a modest effort to list down some of those which will be beneficial for fellow SAPBuilders during their BUILD app development.

REST/Odata API In integration with BTP destination

SAP Build provides a very efficient option to integrate SAP BTP destination API calls. Basic information on this can be found here . These calls can be utilized in a very similar way as Postman but of course with a little bit of adjustment as per BUILD apps configuration structure. One of the efficient ways is:

When the data variable for REST/OData call gets configured, the search property can act as a placeholder for passing the parameters to the API call.

In below example, a Northwind API is getting called with search parameters configured with Customer name.

Rest1

In this binding context, select the “Object with properties” type.

REMAIN2

And then in the subsequent screen, provide the query parameter options in the same fashion as you would provide in the postman API call.

remainder3

This can be used with API entity names as well as any other common parameter options such as $top, $skip, $filter and so on.

Using API URL through BUILD apps

One more trivial issue which you will often get while working with SAP BUILD in combination with SAP BTP is the difference between API URL via the POSTMAN and through BUILD apps via BTP destinations.

To make it more clear, let’s take an example of Cases API from C4C. If we call this API via POSTMAN, we directly use the entire URL for the call i.e. https://myC4CSYSTEM.crm.cloud.sap/sap/c4c/api/v1/case-service/cases.

But when I tried using the same approach to configure this entire URL in SAP BTP destinations, it started giving me inconsistent results. Then I had to cut down the URL at the parent entity e.g. https://myC4CSYSTEM.crm.cloud.sap/sap/c4c/api/v1/case-service, thus leaving out the cases entity section of the URL. And then while calling this destination from SAP BUILD apps, configure this missing section in the Get Record Collection in the Logic canvas.

Please note that due to this missing entity name from the URL configuration in SAP BTP destinations, if you try to do a test call via BTP destinations, you will get an error but you can ignore it, as via BUILD apps call it will be resolved.

URL parameters in SAP C4C Mashup Authoring

In C4C mashup authoring configuration, it is a very common requirement to send the data from C4C to BUILD app as a reference to filter data at the time of initial app loading. Please refer to this link for more information on C4C mashup . In this case, the BUILD app gets called from C4C mashup window. We have to first deploy the BUILD app on cloud foundry (CF) and then use this deployed app link from CF into the mashup configuration. We can also specify URL parameters along with this link.

With this way, there is no need to have a selection screen page as a starting point of the BUILD app, instead these URL parameter fields can be used as readily available filter fields to apply on data coming from REST or any other Odata source.

These parameters can be captured in SAP Build with the help of Page Parameters.

page parameters

e.g. if the deployed URL is https://<placeholder>.ondemand.com/page1.index.html along with URL parameters CustomerName. Then the full URL will look like this https://<placeholder>.ondemand.com/page.page1.html?CustomerName=TestCustomer.

And then the page parameter CustomerName in BUILD App will hold the value of the URL parameter passed via C4C and can be utilized to apply as filter on Odata/REST calls. This is a very handy feature to minimize the user interaction errors in terms of providing wrong input to the BUILD app as it will always capture the right set of data from C4C in backend.

New Page Opening

If you are introducing a new page which will be routed via home page, and if BTP Authentication is enabled then it becomes essential to enable this below highlighted setting in new page, e.g. if we have 2 pages, Home page and details page, and we have BTP authentication enabled, then in details page we will have to enable setting – “Allow page to be opened without authentication”. If this setting is not enabled then the second page will not load in the app memory.

newpage

Along with this it is very essential to pay attention while you setup the initial page of your app, as it often gets overlooked when you enable the BTP authentication. After the BTP authentication enablement, go to AUTH section in the BUILD apps and select the initial view as shown below, instead of the default value i.e. SAP BTP Authentication.

initialappscreen

Happy BUILDING!

Yogesh Sohanee

Read all my blogs

Receive our weekly blog by email?
Subscribe here: