Code: Alles auswählen.
data:
LT_STACK type ABAP_CALLSTACK.
field-symbols:
<ls_stack> type ABAP_CALLSTACK_LINE.
call function 'SYSTEM_CALLSTACK'
EXPORTING
MAX_LEVEL = 1 "Die Aufruftiefe so tief wie du es brauchst
importing
CALLSTACK = LT_STACK.
read table LT_STACK assigning <ls_stack> index 1.
if sy-subrc eq 0.
...
endif.