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: 
masa_139
Product and Topic Expert
Product and Topic Expert
73,437

Please share your ideas and solutions for setting a theme parameter to SAP Fiori launchpad.

Feel free to edit this page.

Background:

URL string is long for setting a theme parameter to SAP Fiori launchpad. Users won't type URL string and you have to give a easy way for setting a theme parameter.

Full URL string:

https://<host>.<domain>:<port>/sap/bc/ui5_ui5/ui2/ushell/shells/abap/Fiorilaunchpad.html?sap-client=<client>
&sap-theme=<theme>@https://<host>.<domain>:<port>/sap/public/bc/themes/~client-<client>

Reference: How to setup your company logo in SAP Fiori launchpad

Ideas/Solutions:

There are several ideas to give easy access.

  1. Embedded hyper link in Corporate web page. - User just click the link and link has full URL.
  2. Set default theme parameter SAP_FLP-THEME
  3. Using URL shotener tool. - There are several tools in the market.
  4. Using proxy server re-writing. - Proxy server will add a theme parameter.
  5. Specify a theme in bootstrap of app
  6. Hard coded in index.html. - You can set it without asking your IT network team.

Example 2: Set default theme parameter SAP_FLP-THEME

System default theme is defined in the transaction /UI2/NWBC_CFG_SAP.

You can chnage the system default in the transaction /UI2/NWBC_CFG_CUST.

Call Fiopri launchpad without theme parameter.

https://<host>.<domain>:<port>/sap/bc/ui5_ui5/ui2/ushell/shells/abap/Fiorilaunchpad.html?sap-client=<client>

The custom theme is set from SAP_FLP-THEME in the transaction /UI2/NWBC_CFG_CUST.

Example 6: Hard coded in index.html and starrt launchpad with /fiori.

This is just an example for starting SAP Fiori launchpad with a theme parameter by https://<host>.<domain><port>/fiori .

Theme parameter is specified in the index.html.

Steps:

1. Define external alias for Unified Shell service. Unified shell is technical name for SAP Fiori launchpad.

Transaction: SICF

Search Unified Shell service

Go To External Aliases

Select the default_host and create a system alias

External Alias name is /fiori. Target Element is /default_host/sap/bc/ui5_ui5/ui2/ushell.

Save.

/fiori is created.

2. Create index.html and hard code the full URL.

Transaction: SE80

App: /ui2/ushaell

Write short HTML code. This load Fiori launchpad with a theme parameter.

-----------

<html>

<head>

    <script language="JavaScript">
    function loc(){window.location = "shells/abap/Fiorilaunchpad.html?sap-theme=<theme>@https://<host>.<domain>:<port>/sap/public/bc/themes/~client-<client>";}
    </script>
</head>
<body onLoad="loc()"></body>
</html>

-----------

Activate.

3. Test the URL on browser.

Your theme is applied.

27 Comments
former_member9607
Active Participant
0 Kudos

Hi Masa,

Thanks for sharing such a nice document.

I have an idea to set the theme parameter for not only launchpad but also all the Fiori Apps.

As per my experience, after working in this domain, let us assume a scenario where a customer/partner will have specialized graphics designer to create themes. Graphics designer will design the theme for fiori app and If he has rights to access the theme builder he/she will make changes accordingly or the fiori admin will do this job.

Now there may be the scenario, that customer wants to have different themes for different apps and also wants that user can choose his/her choice of theme. ( like we do with Gmail)

To achieve this, we can provide an option on Launchpad to choose a theme. This will set theme parameter in the launchpad's landing page. (index.html/main.html) For fiori applications we can inherit the theme parameter which has been passed from the launchpad. or we can provide same option for applications also. This solution will also work in case of custom apps.

To make the selection of theme permanent, of course we need to save those user specific values in the back end else we can pass the default one.

The main advantage of this approach is to reduce the maintenance of URL. After launching the application/launchpad, application does not require to worry about the theme set in URL.

It will give user a freedom to choose ( or build in future) his/her own theme.

Apart from all this, we know that fiori is made for Keeping simple things simple :smile: .. but you never know the end user's expectations :smile: they always want more n more...

I hope the above idea make some sense.. :smile:

Murali_Shanmu
Active Contributor
0 Kudos

Its a good idea too. I have a scenario where each of the Apps need to be launched from corporate application. Hence, we would be asking the team maintaining the corporate application to launch each of the Fiori Apps with the theme as a parameter.

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Updated: Example 2: Set default theme parameter SAP_FLP-THEME

0 Kudos

Hi Masa,

excellent info, thanks for that.

The 2nd part (create index.html in ushell) would be a modification, right?

At least, I get an request to add the object access key...

Regards,

Andreas

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

It just adds index.html and there is no change for existing code.

0 Kudos

I would consider using window.location.replace( ) instead of simply setting it.

This avoids the ugly "cannot-navigate-browser-back via this page" effect as the
start page is not put into the browser history.

-----------

<html>

<head>

    <script language="JavaScript">
    function loc(){window.location,.replace("shells/abap/Fiorilaunchpad.html?sap-theme=<theme>@https://<host>.<domain>:<port>/sap/public/bc/themes/~client-<client>");}
    </script>
</head>
<body onLoad="loc()"></body>
</html>

-----------

HemendraS
Participant
0 Kudos

Thanks for sharing Masa, excellent blog.

Warm Regards

Hemendra

TimMuchena
Participant
0 Kudos

Hi Masa

It still requires access key, right?

Thank you

HemendraS
Participant
0 Kudos

Yes Eli,

But if you follow Example 2 - Set default theme parameter SAP_FLP-THEME above in transaction /UI2/NWBC_CFG_CUST, no access key is required. Please refer below URL:

Defining Configuration Parameters in Customizing - User Interface Add-On for SAP NetWeaver - SAP Lib...

Thanks,

Warm Regards

Hemendra

TimMuchena
Participant
0 Kudos

Hi hemendra.sabharwal

I did follow example 2 but the new theme only displays when I log into Fiori. For other users its still displaying the old theme. Any idea of why its behaving that way?

Kind regards

HemendraS
Participant
0 Kudos

Hi Eli,

Few days back I was also facing the same problem, masayuki.sekihara helped me to resolve the same, please "Delete the personalization value /UI2/USER_PROFILE in SU01 for the User" probably this will help you. Kindly refer my earlier thread on the same issue:

Setup Theme Parameter in Fiori Launchpad


However I am still looking for mass reset of profile for all users in system.

Thanks,

Warm Regards

Hemendra

bharanidharan
Active Participant
0 Kudos

Hi Masa,

I am getting the below peculiar issue while using custom theme for launchpad.

The top left is expected but the bottom right is the actual screen appearing.

Kindly help me regarding this issue.

Regards,

Bharani

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Please create a new Discussion.

Former Member
0 Kudos

Hi Masayuki

I have been using Exmple 6 with Index.htm

Would you advice how this will change with new Cache Buster.

http://help.sap.com/saphelp_uiaddon10/helpdata/en/1b/eb97dba2d4414cb53ed656c0e8c70b/content.htm

I can't find /ui2/flp in SE80.


Thank you

Santosh Lad

Murali_Shanmu
Active Contributor
0 Kudos

Hi Santosh, Cache buster is a feature available from SAP_UI SP11. You should be able to see and activate thius service from SICF.

Former Member
0 Kudos

Hello Every one,

Please guide me how to enable https on Fiori launchpad?

It is urgent please guide me.

Regards,

Faheem

nageshcaparthy
Product and Topic Expert
Product and Topic Expert

Hi Faheem,

Please post a question on SCN to get quick Reply.

Regards,

Nagesh

0 Kudos

As an addition:
The Fiori Launchpad allows user to personalize themes.
Setting the default theme will not affect users who have (or had) previosly selected a differnent theme.

To reset these users to the default theme, one has to delete their personalization data of

key /UI2/USER_PROFILE  ( see SU01 -> tab personalization).

Former Member
0 Kudos

Hi Masa,

Thanks for sharing as This is an excellent Blog to refer to for FIORI THEME.

Well there's a bug or something, I dont know coz we are facing an isue foor this.

I have shortened the URL for our development system.

When we try to access the shorter URL, it gives us the login page

After we enter the login credential, the page goes blank

there's nothing on the page

its strange as we are able to access the LOGON page with the shorter URL but am not able to login as after entering the credentials the page goes blank.

Can you help,

Xherdan

0 Kudos

Hi Bharanidharan,

I am facing the issue similar to yours.

Could you please help me in resolving the same at the earliest?

I have already tried reseting the profile parameter value for the variable /UI2/USER_PROFILE.

Regards,

Sumit Jindal

bharanidharan
Active Participant
0 Kudos

Hi Sumit,

Please create a new discussion.

Also try clearing the theme caches.

Regards,

Bharani

0 Kudos

did you solve the issue

Jocelyn_Dart
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Venkat.

Please do not resurrect old threads. This is against SCN Rules of Engagement. Correct approach is to post a new discussion & include a link to the old discussion. This is the fastest way to get an answer based on CURRENT advice & options

rgds

Jocelyn

agentry_src
Active Contributor
0 Kudos

Not to mention that unless you are asking for clarification/correction of some part of the Document, please create a new Discussion marked as a Question.  The Comments section of a Blog (or Document) is not the right vehicle for asking questions as the results are not easily searchable.  Once your issue is solved, a Discussion with the solution (and marked with Correct Answer) makes the results visible to others experiencing a similar problem.  If a blog or document is related, put in a link.  Read the Getting Started documents (link at the top right) including the Rules of Engagement. 

NOTE: Getting the link is easy enough for both the author and Blog.  Simply MouseOver the item, Right Click, and select Copy Shortcut.  Paste it into your Discussion.  You can also click on the url after pasting.  Click on the A to expand the options and select T (on the right) to Auto-Title the url.

Thanks, Mike (Moderator)

SAP Technology RIG

Former Member
0 Kudos
Hi,

I followed all the step, had reset the   /UI2/USER_PROFILE in SU01 ->Personalization, yet the logo is not changing. I do have cleared the browser cache as well.

UI5 version used is - 1.44.

Could you please help. Waiting for the response.

 

Thanks & Regards,

Suman
0 Kudos
Hi Masa,

I have followed the steps to define short URL for SAP Fiori but I am getting below error.

SAP Fiori URL: http://<hostname>:<port>/fiori/index.html  --> I can see below messages on window.

<%@page language="ABAP"%>

I removed this entry from index.html then I can see blank screen.

 

Please help me.

 

Thanks,

Nagaraju

 
jpeci
Explorer
0 Kudos

Same happens for me.

Do you find a solution?

I think is obligatory create an index.html whit key register, isn't it?

 

Thanks.

 

Regards