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: 

How to hide Tabstrip Customer data in Screen Exit of MEREQ001 for particular Conditions

0 Kudos

Hi

i use enhancement MEREQ001 for Screen exit

Screen exit SAPLMEGUI 0014 SUB0 SAPLXM02 0111. Here i have created a tabstrip.

Now our requirement is for particular condition we have to hide the tabstrip . Is there any way we can do that?

Thanks & regards,

1 ACCEPTED SOLUTION

0 Kudos

i found the solution

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,

12 REPLIES 12

BUTZ
Explorer
0 Kudos

Hello Baraket,

normally I use at PBO the screen-Group for it.

I never used it for tabstrips bevor, but for fields it works fine.

with a loop at SCREEN you can modify depending from the screen-Group the flag Invisible .

Regards Oliver

0 Kudos

Thank for your reply

Yes fields with loop at screen work fine but tabstrip not hiding.

BUTZ
Explorer
0 Kudos

DId you check out the BAdi ME_GUI_PO_CUST ?

I thought it's for both , PO and PREQ, but I'm not sure.I only used it in the past for PO.

Here is a method called SUBSCRIBE which is responsible to populate the custom tabstrip.

may this help in your case. even you are able to decide if it will be populate or not.

regards Oliver

Sandra_Rossi
Active Contributor
0 Kudos

You declared the tabstrip control variable this way:

CONTROLS ctrl TYPE TABSTRIP.

Just do that:

ctrl-invisible = 'X'.

0 Kudos

Tabstrip is created automatic with screen exit

Why did you say "i have created a tabstrip." then? A tabstrip (control) is an area where you have one or more TABs i.e. the Customer Data tab is part of a tabstrip.

I guess you mean how to hide the standard TAB Customer Data in some given custom conditions. Right? If yes, I think that you can't, unless you use the Enhancement Framework to modify the standard (in LOOP AT SCREEN in the (sub)screen containing the tabstrip containing the Customer Data tab, you have to set SCREEN-ACTIVE = '0' for the pushbutton corresponding to the Customer Data tab)

raymond_giuseppi
Active Contributor

Did you actually create a tabstrip in your subscreen?

0 Kudos

I've implemented MEREQ001 customer exit and created screen 0111 which shows up as a "Customer Data" Tab in ME5xN transactions. There's a requirement, however, to hide custom tab based on a specific condition. I'm able to hide the fields but is it possible to suppress the whole tab when all the fields in it are hidden

0 Kudos

As you wrote "I'm able to hide the fields": did you already implement a LOOP AT SCREEN... MODIFY...? If so, then it should be easy to hide also the tab. Something like this:

loop at screen.
...
if ( hide_tab = abap_true and screen-name = 'Customer Data' ).
screen-active = '0'.
screen-invisible = '1'.
modify screen.
endif.
...
endloop.

Or maybe you can give some more information how you managed to hide the fields...?

0 Kudos
jmodaal If I have understood well, the OP wants to hide the standard tab "Customer Data" on a "specific condition". I guess to avoid to have a tab with an empty content. Hence, it's the standard program that the OP needs to enhance. So, it's not easy because there is no user exit for that.

0 Kudos

i found the solution

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,

0 Kudos

Hi souha_baraket, Can you please let me know what methods you used and where did you add the code to deactivate/activate the custom Tab after reading the Custom_view from Get_view.

I have a requirement to supress/disable the custom tab under PO header and PO item based on the PO document type.