Application Development and Automation 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: 
Read only

Hiding custom tab in ME51N

former_member206377
Active Contributor
0 Kudos
1,769

Hi,

I have added a custom tab in ME51N with a single field using the exit MEREQ001 .

However, I am unable to hide the custom tab based on conditions. Is there any way it can be achieved ?

I tried hiding it by deactivating the field in the tab, but it does not work.

Any inputs on this please?

Regards,

Vasuki

3 REPLIES 3
Read only

Nicolas
Active Contributor
1,219

Hello,

Yes, it is possible using the Framework object (CL_FRAMEWORK_MM).

First of all, you have to get the framework instance:

cl_framework_mm=>get_instance(
  importing
    ex_instance = data(framework) ).

Then, get the view identified by its dynpro number (which I do not remember) and the program:

framework->get_view(
  exporting
    im_prog  = 'SAPLMEGUI'
    im_dynnr = '<dynnr>'
  importing
    ex_view  = data(custom_view) ).

You could then hide/unhide the custom tab (view) by calling methods deactivate( )/activate( ).


Best regards,

Nicolas

Read only

former_member206377
Active Contributor
0 Kudos
1,219

Hi Nicolas,

Where should this be called and I do not find any methods to Deactivate/activate. Can you please let me know.

Regards,

Vasuki

Read only

0 Kudos
1,219

Hi vasuki.spatki, Did you get any solution for this. I have the same requirement where i have to hide/disable the custom tab at PO header and PO item based on PO document type.

Thanks in Advance,

Prakash A