Skip to Content

Did you ever had to step into loop looking for 46-th row or looking for occurrence of some value?

Instead of painful record by record stepping trough loop, why not use breakpoints/watchpoints?

While debugging one can do this:

1. Open up Breakpoints/Watchpoints tab


2. Select breakpoint:


3. Set break point condition:


4. Continue debugging (F8):


5. This is it: debugger stops at 46-th record of the loop.


6. In case one need to stop at some specific value – at the step 3 specific condition is entered:


Small but useful debugging trick, I hope it will be helpful!



To report this post you need to login first.


You must be Logged on to comment or reply to a post.

    1. Mario Prkacin Post author

      Thanks Thangam.

      Those kind of tips are probably nothing new for abap expert developers but for us functional consultants who use abap occasionally, it’s good to have this kind of information available in SCN.

  1. Kumar Akshat

    Well, there’s an easier way out. You can simply specify the “Skip” number there in the same tab and achieve the same result.

    1. Mario Prkacin Post author

      Thanks for your comment Kumar,

      of course “Skip” is easier way to get to exact row in the loop but if you don’t know exact sy-tabix or you want to stop at first occurrence of some value or when condition is achieved  (last example picture: ls_item-wa_item-itemtype NE ‘0TAXITEM’) you have to define condition.
      From this point of view it’s more useful to teach people how to use conditions.

  2. Nithya M


            its veryuseful one……many times i thinking about how to debugging particular record from the loop.Now cleared..its time saving also….. ➕

    1. Manish Kumar

      Sy-tabix can change multiple times inside a loop due to nested loop, read statements, FM calls. Watchpoint can give false alarm.

      Conditional breakpoint is more exact because it will stop at desired line number, when some additional condition is satisfied.

      1. Mario Prkacin Post author

        I checked watchpoints.

        Manish is right for sy-tabix in complex conditions like nested loops, read statements etc, but I believe, same risk is possible when breakpoint has been used.

        In watchpoint one can use additional/complex conditions same as in breakpoints and from that point of view it’s identically useful.

        Correct me if I’m wrong.



        1. Sameena Patel

          I have been using watchpoints to achieve this. For simple loops, sy-tabix works, but for complex loops I prefer adding additional condition with value check

  3. Sagar Tallapragada

    Nice topic. instead of going to watchpoints screen in debugger as shown in the screenshots, directly right click on the debugging point and pickup conditional break point and write the same! you can write the complete condition. definitely it is useful when you have many entries in the internal table.

    How it is different from watch points?

    you can have multiple conditions with various operands.

    it is just smaller version of script debugging and better than watch points. if you want to go advanced, you can explore script debugging where you can write code for debugging using wizard!

    1. Mario Prkacin Post author

      Thanks for valuable comment. Until now, I didn’t need script debugging.

      Maybe, You should consider to prepare document on topic of script debugging? ๐Ÿ™‚




Leave a Reply