Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

determining subroutine name dynamically!!!

Former Member
0 Likes
376

Hi,

How to determine the subroutine that is currenlty being executed in the abap program?? Is there a system field which indicates or is it stored somewhere globally?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
348

In The subroutine

DATA ET_CALLSTACK TYPE SYS_CALLST.

DATA WA_CALLSTACK LIKE LINE OF ET_CALLSTACK.

CALL FUNCTION 'SYSTEM_CALLSTACK'

IMPORTING

ET_CALLSTACK = ET_CALLSTACK.

.

READ TABLE ET_CALLSTACK INTO WA_CALLSTACK INDEX 1.

ET_CALLSTACK-EVENTNAME would have the current subroutine being executed.

Cheers.

1 REPLY 1
Read only

Former Member
0 Likes
349

In The subroutine

DATA ET_CALLSTACK TYPE SYS_CALLST.

DATA WA_CALLSTACK LIKE LINE OF ET_CALLSTACK.

CALL FUNCTION 'SYSTEM_CALLSTACK'

IMPORTING

ET_CALLSTACK = ET_CALLSTACK.

.

READ TABLE ET_CALLSTACK INTO WA_CALLSTACK INDEX 1.

ET_CALLSTACK-EVENTNAME would have the current subroutine being executed.

Cheers.