03-09-2006 5:44 AM
Hi all,
Can u explain the usage of watchpoint concept in detail in ABAP Debugging .
Thanks in advance
Ravi
03-09-2006 5:47 AM
Hi Ravicharan,
Watchpoints are field specific. The program is stopped when the field reaches the value specified in the watchpoint. Execute the program in debugging mode. Position the cursor over the needed field. Press the F button to get the view of field. Select the checkbox for the needed watchpoint. Click on the continue button.
Setting WATCHPOINTS
Execute a program in debugging mode.
Position the cursor over the needed field.
Press the F button to get a view of the fields.
Select the checkbox for the needed watchpoint.
Click on the CONTINUE button.
To display the active watchpoint select Goto -  Breakpoint
Regards,
Ashok
03-09-2006 5:48 AM
Hi ravichandran,
1. suppose i have a long program with
many loops, logic etc.
2. i want to know,
AT WHAT POINT
the value of variable 'XYZ' becomes 5
3. So intead of debugging
every line and loop,
we define and tell the system
that
4. WHENEVER THE VALUE OF VARIABLE 'XYZ' BECOMES
5, NOTIFY ME (STOP AT THAT LINE OF CODE)
5. This is called WATCHPOINT
regards,
amit m.
03-09-2006 5:48 AM
Hi Ravi,
Watch points stops/ notifies you where the value of the variable is getting changed/updating. For Example if u have put a watch point at IT_MARA then when the internal table IT_MARA is getting updated/ changed it stops/Notify you at that place....
Regards,
Santosh P
03-09-2006 5:49 AM
Hi
Suppose u dont where u want to put break point.
or suppose in ur ouput value appear is 10 but actualy u want 3. so u have to put watch pt on that variable.
use equal to 10.
Then program will set breakpoint automatically at that point.
U can view what is problem in coding.
In short want to see the behavour of variable SY-subrc or any variable u can use Watchpoint equal or not equal to anything.
U have achieve ur goal.
just have look into following link
http://help.sap.com/saphelp_nw04/helpdata/en/c6/617cdce68c11d2b2ab080009b43351/content.htm
http://www.sap-basis-abap.com/sapab002.htm
http://help.sap.com/saphelp_40b/helpdata/en/34/594231e86b4b96e00008000992f317/content.htm
I think this should solve ur doubt.
regards
vinod
03-09-2006 5:49 AM
Hi Ravi,
A watchpoint can be used in the code to preset the debugger to stop at a certain value of a variable in the program. This is particularly useful if you want to trace a particular value of a variable inside an internal table of, say, 100 lines. Just create a watch point on that field, and set the watch point value to the number you want to see, for eg, Itab-ebelp = 80. The debugger will take you automatically to that line, instead of you having to execute each loop pass till you reach that value.
Hope this helps.
Sudha
03-09-2006 5:51 AM
Hi Ravi,
Breakpoints and watch points enable you to view how the data flows.
We can create our own watch points with some condition which means internally it act as a breakpoint and once that condition is reached ,it will stop there in debugging.
Cheers
Sunny