on 05-06-2015 1:41 PM
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 ).
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
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
Hi Francesca,
Thanks for your email it works.
Thanks,
Srinivas.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.