Skip to Content

First login not load custom theme on SAP Fiori

Hello experts,

We are facing a strange issue with first loading of custom theme. We set on /UI2/NWBC_CFG_CUST as this:

When a user do the first login on SAP Fiori this is the screen that is showed to him:

If the user manually change theme for the standard one, standard theme load perfectly. If the user changes back to the custom theme, it load successfully too!

After this, if user logoff and logon again, custom theme is loaded at the first time successfully.

The goal is the user doesn't have to change theme. It have to be loaded successfully on the first time using the custom "Z" theme.

Anybody have any ideia about this issue?

Regards,

Bruno Serrão.

scn1.png (14.5 kB)
scn2.png (25.4 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Nov 09, 2016 at 06:25 PM

    Any updates? I face the same issue.. :(

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 24, 2017 at 12:40 PM

    Could you find a solution? I have the same issue

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 21, 2017 at 08:53 PM

    Hi Bruno,

    In order to fix this issue, GOTO SU01 transaction - Enter the User - Switch to edit mode - Click on Personalization tab - navigate to /UI2/USER_PROFILE - Select it - Click on the Trash icon. It will not delete but resets the user profile. Now the custom theme which has been set will load automatically.

    Hope this helps.

    Regards,

    JC

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 28, 2018 at 05:45 PM

    Though it is old blog, might be helpful for others who are still looking into this issue. Please check below note

    2465991 - Resetting /UI2/USER_PROFILE has only partial effect on Fiori Launchpad personalization

    If you still want to reset the user profile for mass users, then you need to write custom code as shown below:

    Fill the selection screen parameters with user ids and theme name and execute it.

    *&---------------------------------------------------------------------*
    *& Report ZFIORI_THEME
    *&---------------------------------------------------------------------*
    REPORT ZFIORI_THEME.
    TABLES: suid_st_bname.
    DATA: lt_spers_obj TYPE TABLE OF spers_obj WITH HEADER LINE.
    DATA: lv_spers_fld TYPE spers_fld.
    DATA: BEGIN OF tp_s_user_profile_base,
            uname           TYPE syuname,
            id              TYPE string,
            shell_type      TYPE string,
            value           TYPE string,
            data_type       TYPE string,
            edit_state      TYPE i,
            validation_mask TYPE string,
          END OF tp_s_user_profile_base .
    DATA: s_obj  TYPE RANGE OF spers_obj-object_id,
          sr_obj LIKE LINE OF s_obj.
    DATA: lv_uname TYPE sy-uname.
    DATA: pers_data      LIKE TABLE OF tp_s_user_profile_base,
          pers_data_list TYPE spers_adt.
    SELECT-OPTIONS: s_user FOR suid_st_bname-bname.
    PARAMETERS p_theme TYPE /ui2/nwbc_cfg_param_value.
    START-OF-SELECTION.
      LOOP AT s_user REFERENCE INTO DATA(lsr_user).
        CLEAR: sr_obj.
        sr_obj-sign = lsr_user->sign.
        sr_obj-option = lsr_user->option.
        sr_obj-low = lsr_user->low.
        sr_obj-high = lsr_user->high.
        APPEND sr_obj TO s_obj.
      ENDLOOP.
      SELECT * FROM spers_obj INTO TABLE lt_spers_obj
        WHERE pers_type EQ 'U'
          AND object_id IN s_obj
          AND pers_key EQ '/UI2/USER_PROFILE'
          AND fieldname EQ 'VALUE'.
    END-OF-SELECTION.
      lv_spers_fld = p_theme.
      LOOP AT lt_spers_obj.
        CLEAR: pers_data, pers_data[], lv_uname.
        lv_uname = lt_spers_obj-object_id.
        CALL METHOD cl_pers_admin=>get_data
          EXPORTING
            p_pers_key       = '/UI2/USER_PROFILE'
            p_uname          = lv_uname
            p_user_data_only = ' '
          IMPORTING
            p_pers_data      = pers_data
            p_pers_data_list = pers_data_list.
        LOOP AT pers_data ASSIGNING FIELD-SYMBOL(<fs_pers>).
          <fs_pers>-value = lv_spers_fld.
        ENDLOOP.
        CALL METHOD cl_pers_admin=>set_data
          EXPORTING
            p_pers_key          = '/UI2/USER_PROFILE'
            p_uname             = lv_uname
            p_pers_data         = pers_data
          EXCEPTIONS
            pers_key_not_found  = 1
            data_type_error     = 2
            user_does_not_exist = 3
            not_set_to_default  = 4
            pers_key_locked     = 5
            OTHERS              = 6.
        IF sy-subrc EQ 0.
          WRITE:/ lv_uname, (50) 'Updated'.
        ELSE.
          WRITE:/ lv_uname, (50) 'NON-Error'.
        ENDIF.
      ENDLOOP.
    Add comment
    10|10000 characters needed characters exceeded