06-07-2017 11:22 AM
Hi,
Want to hide the custom tab in ME21N based on certain condition.This tab is created using screen exit MM06E005.
please let us know how to hide this tab.
we tried following but it is not working
1) BAdI ME_GUI_PO_CUST and ME_PROCESS_PO_CUST, with method FIELDSELECTION_HEADER or ITEM,
CASE your_test.
WHEN 'C'.
<fs>-fieldstatus = '.'. " Ready for input
WHEN 'A'.
<fs>-fieldstatus = '*'. " Display only
WHEN OTHERS.
<fs>-fieldstatus = '-'. " Inactive
ENDCASE.
2) CL_TABSTRIP_VIEW_MM-PBO in this we tried screen-invisible = 1 , the tab got hidden but the content of the custom tab is overwritten in material data tab at item level, when we select other tab and come back to material tab it is showing properly(initial display is problem)
Thanks,
shanmuga
06-08-2017 3:57 PM
Hi Shanmuga,
If we make all the fields that are in this tab as display then automatically the tab disappear... That is how I handled the same scenario. By the way I have not used screen user-exit but Badi (ME_GUI_PO_CUST) for handling the custom tab
IF_EX_ME_PROCESS_PO_CUST~FIELDSELECTION_ITEM Special Field Selection Item
Code:
READ TABLE ch_fieldselection ASSIGNING <fs> WITH TABLE KEY metafield = mmmfd_cust_10.
IF sy-subrc EQ 0.
IF lv_flag EQ abap_true.
<fs>-fieldstatus = '+'. " Change
ELSE.
<fs>-fieldstatus = '-'. " Display
ENDIF.
ENDIF.
Regards,
Murali