Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Bunny
Advisor
Advisor
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.

Resolution:

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:


 

  1. IAM Apps: Open the context menu and choose File > New > Other ABAP Repository  ObjectCloud Identity and Access Management > IAM App > Next to launch the creation wizard.

  2. 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:-
    https://help.sap.com/docs/btp/sap-abap-development-user-guide/creating-app

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

  4. In tab Apps add your IAM app. After adding the app you can click on the button "Publish Locally"

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

  6. Add your Business catalog ID and Press Publish Locally.

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

SAP S/4HANA Cloud ABAP Environment | SAP Help Portal

 

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.

 
5 Comments