Run Time Error GETWA_NOT_ASSIGNED while accessing data from another stack program through Field symbol
Problem Description: Friends! I encountered one issue in my Project related to ABAP Dump GETWA_NOT_ASSIGNED. Actually we wrote one enhancement which triggered during creation of inspection lot via MIGO. This we wrote in customer exit EXIT_SAPLQPL1_002.
When we tested this It worked Fine and changes were moved in Production without any issue.
Problem occurred after 2 or 3 months when user tried to run MI07 (This Tcode also Triggers the same exit ) and faced some DUMP which says GETWA_NOT_ASSIGNED means Field symbol has not yet been assigned. At first sight it looks very simple that After assigning the field symbol we have to check if it was assigned successfully or not. I did the same but no hopes, dump was still there.
DUMP was there at line number 79.
Problem Cause :
Here I want to fetch data from Stack program SAPLMBWL. Error analysis from ST22 says :
You address a global function interface, although the
respective function module is not active – that is, is
not in the list of active calls. The list of active calls
can be taken from this short dump.
I checked the all stack loaded program , It contains SAPLMBWL in the list. All OK here also.
I also tries TRY ENDTRY. But this exception is non-catchable.
Problem Solution :
Then I read above error analysis again and again and found that function module which contains IMSEG as parameter is not being called in the flow. So is that cause of issue… May be!!!
then I tried following piece of code which test the parameters of function modules of SAPLMBWL.
Guess what!! It worked.
Here in above code first I am fetching complete stack using FM SYSTEM_CALLSTACK .
And then checking if function module of global interface SAPLMBWL contains IMSEG as any parameter. If Yes the only I will assign this parameter.
I couldn’t get any other solution for this , That’s why I am posting this Document, This may help you.
Your valuable comments are welcome also please share If you have any other solution for this.