Technology Blog Posts by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
mathewzdavis
Active Participant
3,452
This blog explains how we can hide or change the order of the group displayed for a particular user in FIORI 2 dynamically.

Scenario: If a user wants to view fiori launchpad with different groups when accessed from different devices. Example: A mobile app which opens fiori launchpad should show only the approval apps even though the user has authorization to many other fiori apps. Another mobile app should show only HCM related apps in the launchpad. So dynamically we have to change the order or we have to hide the group before viewing fiori launchpad.

Solution:  In Fiori 2 there is an option to hide or show the groups from the edit option in the launchpad. So here also we are using the same standard OData service to change the group order or to hide any group. So each time when you call launchpad from the mobile app you should call the below OData service first.

 

Service Detail:

URL: http://<hostname>:<port>/sap/opu/odata/UI2/PAGE_BUILDER_PERS/PageSets('%2FUI2%2FFiori2LaunchpadHome'...

Method:    PUT

HEADERS:

X-CSRF-TOKEN = fetch (fetch the token first and place here)

Authorization = username / password

Accept = application/json

Content-Type = application/json

 

BODY:

{"__metadata":{"type":"PAGE_BUILDER_PERS.PageSet"},"id":"/UI2/Fiori2LaunchpadHome","configuration":"{\"order\":[\”<groupid1>\”,\”<groupid3>\”],\"hiddenGroups\":[\”<groupid2>\”,\"]}"}

 

Example:

{"__metadata":{"type":"PAGE_BUILDER_PERS.PageSet"},"id":"/UI2/Fiori2LaunchpadHome","configuration":"{\"order\":[\"/UI2/Fiori2LaunchpadHome\",\"ZSAP_APPROVAL_BCG\",\"ZSAP_EMP_Serv\"],\"hiddenGroups\":[\"SAP_HR_BCG_EMPLOYEE_T\"]}"}

 

Response Status: 204

 

I had a similar requirement, so thought of sharing this solution.

Thank you

Mathew

 
7 Comments