Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member181923
Active Participant
0 Kudos

I have just hit the oddest case that I've ever hit of a problem with code written in an X function group.

As many of you know, the Purchase Requisition transactions ME5xN have a function group XM02 which can be used to do whatever you want on the customer data tab provided by SAP in ME5xN.

So, suppose a client writes code in XM02 to add three new sub-tabs on a tabsrip that's placed on the customer data tab (by using the PBO and PAI modules for screen 0111 - the subscreen that's provided by SAP in XM02 for customers to "do their thing". 

Furthermore, suppose that the customer has written code to hide/display certain fields on certain customer sub-tabs according to certain business rule logic.

And finally, suppose that during testing, the customer experiences the following:

a) the code for hiding/displaying custom fields on a custom sub-tab works perfectly in ME52n (change mode) and ME53n (display mode);

b) this code also works perfectly in ME51n (create mode), so long as a new purchase requisition is created from scratch.

c) this code does not work in ME51n when the customer tries to create a new purchase record by using the "adopt" feature of Document Overview;

d) even worse, the problem can not be duplicated in debug mode - if you are in debug mode, the hide/display code works just as well in "adopt" create mode as in "create from scratch" mode.

To me, the fact that the problem can't be duplicated in debug mode means that it's more than likely either a timing problem and/or a problem deep inside the "automation queue".

But if a customer were to message SAP with this problem, you all know what the response would be.

And therefore, I'm thinking that maybe if SAP Mentors were willing to review such cases, SAP might be willing to listen if a certain number of mentors agreed that the problem was probably on SAP's side, even though the problem only shows up when customer-written code is executing.

Personally, I would be happy to review a certain number of such cases per year because:

a) it's usually very easy to tell right away if the customer is really at fault;

b) if the customer doesn't seem to be at fault, then the problem is probably an interesting one that's worth anyone's time to look at.

21 Comments