on 06-09-2014 3:48 PM
Hello all,
I am trying to disable a button found in an embeded UIBB toolbar. I had tried to use OVP Toolbar API, but I can access only the global toolbar and not the embeded UIBBs toolbar.
Any idea where I can achieve something similar with the code below (which works for the global toolbar) for my embeded toolbar?
DATA lo_ovp TYPE REF TO if_fpm_cnr_ovp.
DATA lo_fpm TYPE REF TO if_fpm.
lo_fpm ?= cl_fpm_factory=>get_instance( ).
lo_ovp ?= lo_fpm->get_service( cl_fpm_service_manager=>gc_key_cnr_ovp ).
TRY.
lo_ovp->get_toolbar_button( EXPORTING iv_toolbar_element_id = 'DOSOMETHING'
IMPORTING es_toolbar_button = ls_toolbar_ovp_button )
IF iv_eventid = cl_fpm_event=>gc_event_cancel.
ls_toolbar_ovp_button-enabled = abap_false.
ENDIF.
IF iv_eventid = cl_fpm_event=>gc_event_edit.
ls_toolbar_ovp_button-enabled = abap_true.
ENDIF.
lo_ovp->change_toolbar_button( EXPORTING is_toolbar_button = ls_toolbar_ovp_button iv_override_existing_action = 'X' ).
CATCH cx_fpm_floorplan. " Floorplan exceptions
ENDTRY.
The UIBB where the toolbar that I want to change is defined is 2nd level down the hierarchy and the method:
lo_ovp->get_uibbs( EXPORTING iv_content_area = ls_current_content_area-id " FPM: Content Area ID
* iv_section = " FPM: Section ID
IMPORTING et_uibb = lt_uibbs " List of UIBBs ).
returns only the first level of embeded UIBBs in the component configuration hierarchy.
Thank you!
Hi Ana,
If you are trying to disabled or changing the property (like visibility or else )of a UIBB tool bar button , you may directly go to feeder class of that UIBB and in get_data method there is changing parameter called
CT_ACTION_USAGE TYPE FPMGB_T_ACTIONUSAGE
by changing value in this parameter you can change the property of that particular button action directly.
Don't need to go to OVP Component .
Regards.
Ashutosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
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.