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 can PO header and item tabs appear conditionally?

brian_weaver2
Discoverer
0 Kudos

The Business Add-In (BAdI) ME_GUI_PO_CUST enables you to integrate our own subscreens into the Enjoy purchase order at both header and item levels.

I need to conditionally determine if the subscreens should appear or not. For example, for Purchase Org '1000' do not show the customer data tab subscreen. Or for document type 'ZXYZ' show subscreen 9000 at the item level and for document type 'ZABC' show subscreen 9001 at the item level.

However, using the SUBSCRIBE Method in my custom implementation the only detail available is whether the process is for a PO and then whether it is HEADER or ITEM.

Has anyone ever had this same requirement and how were you able to conditionally specify the subscreens for the PO Header or Item?

Best Regards.

2 REPLIES 2

uwe_schieferstein
Active Contributor
0 Kudos

Hello Brian

I assume that when you create a new purchase order (ME21N) the BAdI will already be triggered and presumably method SUBSCRIBE called (you can make a smoke test by adding a CONSTRUCTOR method to your BAdI implementing class containing a break-point. This tells you if the BAdI is triggered within the CREATE transaction. Another break-point in method SUBSCRIBE tells you when this method is excecuted).

Now when you create a new PO how do you know the Purchase Organisation in advance? You cannot.

Thus, my guess is that you cannot achieve this differential display.

Regards

Uwe

0 Kudos

Hello Uwe,

Thank you for your reply. I was afraid that was going to be the answer.

I have used the XM06 function group user exits at other installations where I was able to conditionally present subscreens.

In the SUBSCRIBE method I tried to call the method GET_DATA to determine the header data like is being done in the TRANSPORT_TO_MODEL method but the call does not return any data from that point in the processing.