Skip to Content
0

How to setup SAP Fiori Cloud default theme per user?

Nov 08, 2016 at 10:13 PM

114

avatar image

In SAP Fiori On-Premise, not the new Cloud version running on HCP, we can define the SAP Fiori default theme for a specific user in SU01. We just need to edit User Parameters and add a new entry for /UI2/USER_PROFILE = “theme.id”.

But, how to do the same in SAP Fiori, cloud edition???

I know users can access the FLP and select which theme they want to use. I also know that now we can have multiples FLPs with different configurations. But I would like to use only one FLP and define the default theme dynamically. Let’s say, one group of users see theme X and another group see theme Y.

I checked what happens when we change the default theme as an user, through the User Preferences menu.






When we change our theme,the FLP sends an HTTP POST request to:
https://flpportal-myAccount.dispatcher.hanatrial.ondemand.com/fiori/cp/runtime/v1/sites/myFLP-GUID

The payload is a json like the one below which constains a propertie with the selected theme.id:

{
  "personalizedSite": {    "pages": [],
    "apps": [],
    "properties": [
      {
        "key": "theme.id",
        "value": "sap_bluecrystal"
      }
    ],
    "deletedApps": [],
    "documentModel": true
  }
}

And now, last but not least, every time we access the FLP, an HTTP GET request is sent to:

https://flpportal-m yAccount .dispatcher.hanatrial.ondemand.com/fiori/cp/runtime/v1/sites/myFLP-GUID

It returns a big json which also contains a propertie with the theme.id we selected before, the user’s default theme:
{
  "personalizedSite": {
    "properties": [
      {
        "key": "theme.id",
        "value": "sap_bluecrystal"
      }
    ]
  }
}

More questions now.

Where is the “theme.id” stored? Is possible to assign it to a role? Is possible to assign it to an user manually?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Jeremy Good
Nov 10, 2016 at 02:39 PM
0

Hi Mauricio - to the best of my understanding there is no configuration option to do what you are trying to accomplish with FLP on HCP. User selectable/persisting themes is your only option. I am a bit curious to know more about the use case or business requirement to manually assign themes to a single user.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Few examples: themes per branch, themes per country, accessible themes assigned automatically and so on...

The idea is not assign it manually per user. I would create a script to do it... Or, best scenario, assigning a themes to a role.

0