Have you ever asked how to find out in which order the userexits in a module (e.g. SAPMV45A) are processed?
With a simple routine, which you have to implement in each routine, you will be able to find out.
PERFORM actual_subroutine.
Instead of writing the result you may insert the actual subroutine and a timestamp (and maybe okcode?) into your own table. The write will not work.
Set the parameter-id "TST" to "X" before you want to "debug" the processed userexits and clear it after having finished.
FORM actual_subroutine.
data testing.
get parameter id 'TST' field testing.
*-- Process only if testing parameter
*-- is active
check testing = 'X'.
TYPES:
begin of abap_call_stack_entry,
mainprogram like sy-repid,
include like sy-repid,
line type i,
eventtype like abdbg-leventtype,
event like abdbg-levent,
flag_system,
end of abap_call_stack_entry.
DATA:
acse type abap_call_stack_entry,
tab type table of
abap_call_stack_entry.
CALL 'ABAP_CALLSTACK'
ID 'DEPTH' FIELD 2
ID 'CALLSTACK' FIELD tab.
LOOP AT itab INTO acse FROM 2.
WRITE:
/ 'Mainprog:', cse-mainprog,
/ 'Include: ', cse-include,
/ 'Event: ', cse-eventtype,
cse-event.
****
**** INSERT struc INTO TABLE zxroutine.
****
ENDLOOP.
ENDFORM.
Requires Free Membership to View
When you register, you will start receiving targeted emails from my award-winning team of editorial writers. Our goal is to keep you informed on the hottest topics and biggest challenges faced by SAP professionals today.
Hannah Smalltree, Editorial DirectorThis was first published in May 2002
Join the conversationComment
Share
Comments
Results
Contribute to the conversation