Consuming services in UI for SAP S/4HANA Cloud (ABAP Cloud Project)
Problem Statement: For example you created a RAP based application in S/4HANA Public Cloud system and now you want to test it locally(Fiori Elements Preview) but you end up having authorization issue. Like below:
For On-Premise systems this issue won’t arise while testing locally.
To consume services in an SAP Fiori app, you need to define an external app and assign the services to the app. This external app represents the back end of an application. It ensures that you can define the necessary authorizations and enables your business user to consume these services in the SAP Fiori app.
You first create the app itself and as a next step you can create business catalogs and business role templates you can use as a basis for creating business roles.
This is how it will go:
- IAM Apps: Open the context menu and choose to launch the creation wizard.
- On the services tab add your service name and activate your IAM app. When creating this app choose app type as External (An external app represents an app extension. It defines what is included in a tile (this is determined by the services). You can use the external app to bundle services, define authorizations and assign business catalogs.). There are 3 more different types please refer this link:-
- Business Catalogs: Next step is to define a business catalog and add our service to it and activate it. Go to File > New > Other ABAP Repository Object > Cloud Identity and Access Management > Business Catalog.
- In tab Apps add your IAM app. After adding the app you can click on the button “Publish Locally”
- Business Role Template: Now we need to define business role template, Go to File > New > Other ABAP Repository Object > Cloud Identity and Access Management > Business Role Template.
- Add your Business catalog ID and Press Publish Locally.
- Business Role: Now that our business role template is there we need to make a role using this template. LogIn to your S/4 Cloud System > Go to Business Role Templates app > Create a business role for it and assign users to it.
Now you can test with Fiori Elements Preview.
Summary: This short blog can help ABAP devs consume UI services whilest working with Embedded Steampunk. Since this is a much newer approach to run your services on front end unlike in the On-Premise world.
Since i am also new to ABAP cloud , Expert suggestions & feedbacks are much appreciated.
You can also head over to below SAP portal for more detailed help:
If you like this blog post you can follow me for more blogs i will try to make in coming future specifically related to embedded steampunk.