Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

hiding customer tab in me21n based on conditions

Former Member
0 Kudos

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

1 REPLY 1

Former Member
0 Kudos

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