Creating watchpoints while debugging the ABAP Code

By Jayshree Santosh Mahajan, Cognizant Technology Solutions


Many times we have large number of rows into an internal table and we need to debug a particular row say for a particular value of a field which is at 110th row of an internal table, in this case it is very cumbersome to debug an internal table row by row to reach that particular row.

To avoid this we can set a watchpoint for the particular value of a field or variable.

As soon as a change is found in the content of the variable after a Debug step and any conditions set have been met, the Debugger will stop and we see the message "Watchpoint is reached (<Watchpointvariable>)“.

For example, there are 30 entries into the internal table as shown below.  Let us see how can we analyze the 21st record i.e. material number “000000000000000599”?


1.       Set a debugging point at the loop statement of the internal table, once the debugging screen appears then press F5, an entry would appear in the workarea “LS_MARA”.

2.       Now keep the cursor on the field to which we want to set the watchpoint. In this example we want to set watchpoint for the LS_MARA-MATNR.

3.       Press Create watchpoint button on the toolbar of the debugger screen as below.

4.       We will automatically have the variable field populated with the desired field as shown below.

Click here to continue...

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image