‎2009 Jul 21 7:42 AM
Hi Gurus,
Would there be a functionality in Debug mode, if let say you have 3 loop within loops... and you want to know what level in the loop you are in?
E.G.
Loop at table
Loop at table
Loop at table
You are here
Endloop
Endloop
Endloop
Thanks!!!!
Benedict
‎2009 Jul 21 7:44 AM
from the debugger line itself you can see what code is running.
and any ways. in new front end editor in SE38 shows you at what level you are in.
‎2009 Jul 21 7:47 AM
Hi,
Thanks for the reply. My issue here is that, there are lots of subroutines were called. And I want to know if I am still under a loop.
Thanks.
Benedict
‎2009 Jul 21 7:51 AM
Hi,
Refer:-
DATA : lv_text(10) TYPE c.
LOOP AT <itab>.
lv_text = 'Loop 1'.
LOOP AT <itab>.
lv_text = 'Loop 2'.
LOOP AT <itab>.
lv_text = 'Loop 3'.
ENDLOOP.
ENDLOOP.
ENDLOOP.
CLEAR lv_text.
Use this lv_text to know in which loop you are currently in.
Hope this helps you.
Regards,
Tarun
‎2009 Jul 21 7:53 AM
see. if you want it in debugger level then its there.
in the debugger screen(advanced debugger) there is a level area which shows the scope.
this shows the scope of a particular line where the debugger cursor is currently lying.
say some example.
REPORT zsomu_1.
DATA : gt_v TYPE STANDARD TABLE OF vbak WITH HEADER LINE.
gt_v-vbeln = '0030003445'.
APPEND gt_v.
LOOP AT gt_v.
LOOP AT gt_v.
LOOP AT gt_v.
WRITE: gt_v-vbeln. " here you have kept the break point and debugger triggers here.
ENDLOOP.
ENDLOOP.
ENDLOOP.so when debugger starts.
below the program lines you will find (when your cursor is on the 'WRITE STATEMENT')
SCOPE \LOOP\LOOP\LOOP
i hope this answers your question.
thanks
Somu
‎2009 Jul 21 8:02 AM
Hi All,
As I have said, we are using subroutines...
form f_loop.
loop at t_tab into w_tab.
perform f_loop_2.
endloop.
endform.
form f_loop_2.
loop at t_tab into w_tab.
perform f_loop_3.
endloop.
endform.
form f_loop_3.
loop at t_tab into w_tab.
...
endloop.
endform.
and the status that you have mentioned only tells me where i am and not on how deep i am in the loop of the whole program.
status:
when in subroutine f_loop
Scope \FORM f_loop\LOOP
when in subroutine f_loop_2
Scope \FORM f_loop_2\LOOP
Thanks.
Benedict
‎2009 Jul 21 8:04 AM
Hi,
This is possible with NEW (advanced debugger). Did u try my approach already?
Regards,
Manne.
‎2009 Jul 21 8:05 AM
Hi Raja,
I am using the new advanced debugger and still the same.
Thanks.
Benedict
‎2009 Jul 21 7:50 AM
Hi,
If you have a new debugger, switch to it and then place the cursor on the link that you want to see scope in debugging mode, then scope of that statement appears in the FOOTER row of the debugger as below.
Scope \FUNCTION GET_DDIC_FIELD_INFO\IF\LOOP\LOOP\LOOP
"where GET_DDIC_FIELD_INFO is the function name you are debugging.Regards,
Manne.