2020 Apr 02 12:09 PM
Hi All,
I'm trying to debug FOR iterations. I saw a blog where STEP SIZE in debugger mode is used for that. But i couldn't exactly see the results of every iterations using that.
Could you pls guide on how to debug the iterations? TIA
2020 Apr 02 1:46 PM
I think there is a misunderstanding. You are wanting to dig deeper into the system/kernel operations of an ABAP statement, whereas the STEP SIZE is actually used to skip the current breakpoint n times whereas n is defined by the number you set in STEP SIZE for the breakpoint.
Can you share the blog you are referring too?
The only thing I notice when debugging for example the following statement, is that it 'stops' twice, and if you set the STEP SIZE to 2, it will only stop once. Why it stops twice I am not sure yet, because I actually cant see a real added value, because the created table is already filled with the first step and only the first variable is initialized in the second step (see Demo-Report DEMO_TABLE_COMPRH_JOIN):
DATA(itab4) = VALUE itab3(
FOR wa1 IN itab1 INDEX INTO idx
FOR wa2 IN itab2 WHERE ( key = wa1-key )
( key = wa1-key
col11 = wa1-col1
col12 = wa1-col2
col21 = wa2-col1
col22 = wa2-col2 ) ).<br>So maybe for much larger, much complexer FOR iterations and possibly combined with FOR GROUP or UNTIL/DO WHILE or LET or NEXT or COND, WHEN, THEN, ELSE, this might actually be useful and stop more than once (havnt seen an example yet), and yes, in that case, setting a STEP SIZE could then help you to debug quicker through the statement.
Hi All,
I'm trying to debug FOR iterations. I saw a blog where STEP SIZE in debugger mode is used for that. But i couldn't exactly see the results of every iterations using that.
Could you pls guide on how to debug the iterations? TIA
2020 Apr 02 1:46 PM
I think there is a misunderstanding. You are wanting to dig deeper into the system/kernel operations of an ABAP statement, whereas the STEP SIZE is actually used to skip the current breakpoint n times whereas n is defined by the number you set in STEP SIZE for the breakpoint.
Can you share the blog you are referring too?
The only thing I notice when debugging for example the following statement, is that it 'stops' twice, and if you set the STEP SIZE to 2, it will only stop once. Why it stops twice I am not sure yet, because I actually cant see a real added value, because the created table is already filled with the first step and only the first variable is initialized in the second step (see Demo-Report DEMO_TABLE_COMPRH_JOIN):
DATA(itab4) = VALUE itab3(
FOR wa1 IN itab1 INDEX INTO idx
FOR wa2 IN itab2 WHERE ( key = wa1-key )
( key = wa1-key
col11 = wa1-col1
col12 = wa1-col2
col21 = wa2-col1
col22 = wa2-col2 ) ).<br>So maybe for much larger, much complexer FOR iterations and possibly combined with FOR GROUP or UNTIL/DO WHILE or LET or NEXT or COND, WHEN, THEN, ELSE, this might actually be useful and stop more than once (havnt seen an example yet), and yes, in that case, setting a STEP SIZE could then help you to debug quicker through the statement.
2020 Apr 02 2:47 PM
STEP SIZE works very well with the below code, I see the values of <c>, <p>, <f> at every iteration (provided that you filled tables with SAPBC_DATA_GENERATOR). I don't understand your issue.
TYPES sflview_tab TYPE STANDARD TABLE OF sflview WITH EMPTY KEY.
select * from scarr into table @DATA(scarr).
select * from spfli into table @DATA(spfli).
select * from sflight into table @DATA(sflight).
DATA(itab) = VALUE sflview_tab(
FOR <c> IN scarr
FOR <p> IN spfli WHERE ( carrid = <c>-carrid )
FOR <f> IN sflight WHERE ( carrid = <p>-carrid AND connid = <p>-connid )
( fldate = <f>-fldate
deptime = <p>-deptime
carrid = <c>-carrid ) ).
2020 Apr 13 9:05 AM
Thanks for your response. But I'm still confused about when to use STEP SIZE. And sorry, I have no clues about SAPBC_DATA_GENERATOR.
As usual i had filled the table in for iteration and trying to populate itab with some conditions.For Example, if scarr has 10 records and spfli has 2 record matching the condition and sflight with 1 record, how should i use STEP SIZE and what should be expected from using it?
2020 Apr 13 1:47 PM
In the debugger, click the button "Step size" to get from mode "normal step size" to "little step size", then click F5 to debug step by step. Click again "Step size" to get back to mode "normal step size".
2020 May 13 3:52 PM
anabaperlife, please follow up on your open question.
2020 Jun 13 8:11 AM