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: 

get line number at run time

Ghadeer
Participant
0 Kudos
1,503

is there is any way to know program line number at run time ?

something like the one in the debugger program / line number .

4 REPLIES 4

Sandra_Rossi
Active Contributor
700

You may get the current line number only by raising a class-based exception (method GET_SOURCE_POSITION) or by getting the ABAP call stack (for instance, via function module SYSTEM_CALLSTACK).

matt
Active Contributor
700

Why? What are you trying to do?

Jelena_Perfiljeva
Active Contributor
0 Kudos
700

Rather curious about this myself. What could possibly be the purpose of this information?

gunnar247
Discoverer
0 Kudos
99

It can be useful when refactoring code which populates an internal table at many different locations within a huge procedure with many loops and  conditions and we look at that populated internal table and wonder where exactly the rows have been added without having to use the debugger much.