cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying and Hiding UIBB in FPM(OVP) based Roles

0 Kudos

Hi FPM Guru,

                      I have developed a FPM(OVP) application where I am using 6 UIBB's. Based on the role assigned to user I need to show the UIBB to respective user in FPM application. Please let me guide how to achive this.

Thanks,

Gaurav

Accepted Solutions (1)

Accepted Solutions (1)

AbhishekSharma
Active Contributor
0 Kudos

Hi Gaurav,

For hiding UIBB you need to do below steps:

  1. First you need to find details of all your UIBB on Page
  2. Then you need to find out which UIBB you are interested in to HIDE/SHOW
  3. Then you need to retrive details of that specific UIBB
  4. Then you will set HIDDEN property of that UIBB if you want to hide it
  5. Then you will again update UIBB settting

Below is demo code to achieve :

mo_ovp typr ref to IF_FPM_OVP.

CHECK mo_ovp IS BOUND.

TRY .

      mo_ovp->get_uibbs(

        EXPORTING

          iv_content_area = <your content area name / Page name here>

          iv_section      = <your section id>

        IMPORTING

          et_uibb         = lt_uibbs "here you will get all the settings for that UIBB

      ).

    CATCH cx_fpm_floorplan.    " Floorplan exceptions

      RETURN.

  ENDTRY.

In lt_uibb you will get settings of all the controls available you need to put read on this

table and find out uibb of your interest based on config_id etc.

Read table lt_uibb into ls_uibb with key config_id = <your config iD of UIBB>.

you should get only one record in this , once you get this Information then set HIDDEN

property of this UIBB

ls_uibb-hidden = 'T'. " T is for hidden type FPM_HIDDEN type.

Once you set this property you again need to update your UIBB as below

DATA : lo_ovp TYPE REF TO cl_fpm_ovp.

CALL METHOD lo_ovp->change_uibb

        EXPORTING

          is_uibb    = ls_uibb

          iv_section = <your section name>.

Your UIBB will be hidden.

All this you need to do based on roles User have.

This could depend on architecture what is being followed.

you just need to write this code when you want to display/hide your UIBB after Role validation.

Hope this will help.

Thanks-

Abhishek

0 Kudos

Thanks Abhishek, I would like to show required UIBB to the user based on the roles they are authorized.

I would like know ,can this be achievable by creating separate application configuration for each role. In that application configuration required component configuration(based on the role) of UIBB will be linked  and the application configuration is finally linked to the role.

Without coding effort can we achieve that .

Thanks,

Gaurav

Answers (0)