cancel
Showing results for 
Search instead for 
Did you mean: 

Hide the FPM Page Master in OVP

0 Kudos

Hi all,

I have an OVP with a Page Master and a toggle button for manually collapse this page master.

My requirement is to make automatically invisible the page master area when the user click on a certain row in page master.

I tried to raise an 'FPM_TOGGLE_PAGE_MASTER' event and to change the status of toggle button with io_ovp->change_toolbar_toggle_button method but it doesn't work. My code is here below.

Any help?

Thank you,

Francesca

DATA: ls_toolbar_toggle_button TYPE IF_FPM_OVP=>TY_S_TOOLBAR_TOGGLE_BUTTON,

           lv_content_area_id      TYPE FPM_CONTENT_AREA_ID.

       ls_toolbar_toggle_button-element_id = 'FPM_TOGGLE_PAGE_MASTER'.

       ls_toolbar_toggle_button-index = 1.

       ls_toolbar_toggle_button-text = 'Customer Bucket'.

       ls_toolbar_toggle_button-image = '~Icon/BusinessPartner'.

       ls_toolbar_toggle_button-enabled = 'X'.

       ls_toolbar_toggle_button-visibility = '02'.

       ls_toolbar_toggle_button-action_id = 'ACTION_ID_1'.

       ls_toolbar_toggle_button-event_id = 'FPM_TOGGLE_PAGE_MASTER'.

       ls_toolbar_toggle_button-checked = 'X'.

       io_ovp->change_toolbar_toggle_button(

         EXPORTING

           is_toolbar_toggle_button    ls_toolbar_toggle_button

       ).

       DATA:

         lo_event_params TYPE REF TO if_fpm_parameter,

         lr_event        TYPE REF TO cl_fpm_event,

         lo_fpm          TYPE REF TO if_fpm.

       CREATE OBJECT lo_event_params TYPE cl_fpm_parameter.


       lo_event_params->set_value(

         EXPORTING

           iv_key = 'FPM_CHECKED'

           iv_value = 'X' ).

       CREATE OBJECT lr_event

         EXPORTING

           iv_event_id   = lo_event->gc_event_toggle_page_master

           io_event_data = lo_event_params.

       lo_fpm = cl_fpm_factory=>get_instance( ).

       lo_fpm->raise_event( lr_event ).

Accepted Solutions (1)

Accepted Solutions (1)

J_R
Employee
Employee
0 Kudos

Hi Francesca,

in order to make the page master area invisible you can call the OVP runtime API method IF_FPM_OVP->CHANGE_PAGE_MASTER_AREA and set the attribute HIDDEN of input structure IS_PAGE_MASTER_AREA to the value 'X'. In order not to change any other page master area attribute you should first get the current page master area properties by calling IF_FPM_OVP->GET_PAGE_MASTER_AREA.
Please note that you have to implement an Application Configuration Controller (AppCC, based on ABAP or WD interface IF_FPM_OVP_CONF_EXIT) for the OVP.

Best regards,
Jens


0 Kudos

Hi Jens,

thank you for your mail. It works!

Best Regards,

Francesca

Former Member
0 Kudos

Hi Francesca,

I am also trying to achieve similar thing in my application.

But I am stuck in creating the object for cl_fpm_ovp.

Can you please provide me the complete code snippet written to achieve this scenario.

Thanks in advance,

Srinivas.

0 Kudos

Hi Srinivas,

in the OVERRIDE_EVENT_OVP of the application controller you should insert the code here below when your event is raised.

DATA:   ls_page_master_area TYPE if_fpm_ovp=>ty_s_page_master_area,

             lv_content_area_id  TYPE fpm_content_area_id.

           lv_content_area_id = 'MAIN_PAGE'.

           io_ovp->get_page_master_area(

             EXPORTING

               iv_content_area     =     lv_content_area_id

             IMPORTING

               es_page_master_area ls_page_master_area

           ).

          ls_page_master_area-hidden = 'X'.

           TRY.

               io_ovp->change_page_master_area(

                 EXPORTING

                   iv_content_area     lv_content_area_id

                   is_page_master_area ls_page_master_area

               ).

             CATCH cx_fpm_floorplan.    "

           ENDTRY.

         ENDIF.

ls_page_master_area-hidden = 'X' is the code that hide the page master area. In my scenario the name of the page master area to hide was "MAIN_PAGE".


Hope this helps!

Regards,

Francesca

Former Member
0 Kudos

Hi Francesca,

Thanks for your email. Code is working fine.

But here my requirement is I have a FPM Toggle Toolbar button to Hide/Dispaly. If I click Toogle toolbar button it should hide page master area again if I click on Toggle Toolbar button it should show Page master area. Here My FPM button in in Process_Event method. Please let me know how to achieve this functionality.

Thanks in advance,

Srinivas.

0 Kudos

Hi Srinivas,

you wrote: "If I click Toogle toolbar button it should hide page master area" ... when you click Toogle toolbar button, the FPM raise an FPM_TOGGLE_PAGE_MASTER  event.

In OVERRIDE_EVENT_OVP of the application controller you should insert the code that I suggest you when event_id = 'FPM_TOGGLE_PAGE_MASTER'.

Please, let me know if this helps you.

Regards,

Francesca

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Francesca,

Thanks for your email it works.

Thanks,

Srinivas.