This is a very short blog on how to hide entire UIBB (Not just fields) in standard OVP FPM.
Please follow the below steps to achieve the same:
1) Go to the main floor plan page.
2) Right click on the Heading of any Collapsible Panel and select ‘Technical Help…’.
3) Click link named as ‘Component Configuration’.
4) Follow the following path: General Settings–>Floorplan Settings–>Application Controller Settings.
5) A pop up appears with the details of the Web Dynpro Component/Class and Configuration Name.
6) Go to TCODE SE80 and open the Web Dynpro Component.
7) Check the ‘Implemented Interfaces’ tab for ‘IF_FPM_OVP_CONF_EXIT’.
8) Now, we have to implement the ‘OVERRIDE_EVENT_OVP’ method of interface “IF_FPM_OVP_CONF_EXIT”.
9) To do this, go to Assistance class and double click on the Method and add your logic.We enhance this Method by using Implicit Enhancement or by enhancing class and creating PRE/POST/OVERWRITE exits.
NOTE: Please check the snapshots for details.
IF lo_event->mv_event_id EQ 'FPM_EDIT'. io_ovp->get_uibbs( IMPORTING et_uibb = lt_uibb ). LOOP AT lt_uibb ASSIGNING FIELD-SYMBOL(<ls_uibb>). CASE <ls_uibb>-config_id. WHEN 'BS_BP_ADDRESSES'. <ls_uibb>-hidden = abap_true. TRY. CALL METHOD io_ovp->change_uibb EXPORTING is_uibb = <ls_uibb> iv_section = lv_sec iv_add_uibb_to_new_stack = ABAP_FALSE. CATCH cx_fpm_floorplan . ENDTRY. ENDCASE. ENDLOOP. ENDIF. ***NOTE: Type of LT_UIBB can be found in interface: IF_FPM_OVP. We can find the section ID (LV_SEC) from *** the Floor Plan Page.