Skip to Content

Search Help Exit not triggered in VA01

We are trying to limit the number of values in the Order Reason (VBAK-AUGRU) based on the document type. This is just a dropdown without any special code in the screen, from what I can see. So far I've followed the steps in this post successfully and added a search help exit. There are some inaccuracies in that post but I figured it out and it works perfectly fine. Once.

The problems start when the users back out to the first VA01 screen (where the order type is entered), enter a different order type and hit Enter. In this case the search help exit is not called at all. At first I thought there was something wrong with my code or maybe order type was not in memory. But the search help exit code is simply not executed, unless the users totally back out from the transaction.

There is another SCN post with the same exact problem but it's just "assumed answered" and the longest response doesn't seem to answer the question:

There are many other posts about the same issue in other transactions, but all are either a different problem or no answer / "answered myself" with no solution. Nothing in the notes either.

Not even sure what to debug - for obvious reasons nothing happens if you do /h before calling the dropdown and exit is called way before that anyway. Completely baffled by such behavior. Any clues on how to force the search help exit to be triggered?

P.S. By the way, there is already a request posted for this functionality, but we need some solution sooner: Order reasons

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Jul 19, 2016 at 10:39 AM

    I got it. When a drop down list box is linked to a search help, it's called once at the end of the PBO, but there's a mechanism to call it once (the list of values is buffered in the function group of VRM_SET_VALUES, which is implicitly called by SAP when a field is linked to a search help). If you call the function module VRM_DELETE_VALUES in the PBO, with ID being the field name (VBAK-AUGRU), then SAP will call the search help to retrieve the values again, and thus will call the user exit.

    Add a comment
    10|10000 characters needed characters exceeded

    • Thank you, thank you, thank you!!! After I plugged the call for VRM_DELETE_VALUES into USEREXIT_FIELD_MODIFICATION it finally worked.

      I'm not quite sure what's the point of allowing search help user exits and then buffering values for the whole transaction. But hopefully the request below will be addressed and no one will have to deal with this again.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.