Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

regarding watch points in ABAP debugger

Former Member
0 Likes
1,750

Hi,

Could u explain , why we use watch points, what is the use of it

and how to use it.

Thanks & regards,

[email protected]

Hi,

Could u explain , why we use watch points, what is the use of it

and how to use it.

Thanks & regards,

[email protected]

5 REPLIES 5
Read only

Former Member
0 Likes
1,206
Read only

Former Member
0 Likes
1,206

Watch points

http://help.sap.com/saphelp_nw04/helpdata/en/c6/617cdce68c11d2b2ab080009b43351/content.htm

http://help.sap.com/saphelp_47x200/helpdata/en/14/6d1c370c468b7be10000009b38f936/frameset.htm

Like a breakpoint, a watchpoint is an indicator in a program that tells the ABAP runtime processor to interrupt the program at a particular point. Unlike breakpoints, however, watchpoints are not activated until the contents of a specified field change. Watchpoints, like dynamic breakpoints, are user-specific, and so do not affect other users running the same program. You can only define watchpoints in the Debugger.

Use

You set watchpoints in the Debugger to monitor the contents of specific fields. They inform you when the value of a field changes. When the value changes, the Debugger interrupts the program.

Features

You can set up to five watchpoints in a program.

See also Setting Watchpoints.

You can also specify the conditions on which a watchpoint is to become active.

You can specify logical conditions between up to five conditional watchpoints.

See Specifying a Logical Expression.

You can define watchpoints as either local or global. If you define a global watchpoint, it is active in all called programs. Local watchpoints are only active in the specified program.

You can change and delete watchpoints.

See Changing Watchpoints.

You can use watchpoints to display changes to the references of strings, data and object references, and internal tables.

See Memory Monitoring with Watchpoints

If you want to interrupt a program when the contents of a field or structure change, use a watchpoint. You can set up to five watchpoints, including watchpoints for strings.

A watchpoint can be either local or global. Local watchpoints are only valid in the specified program. Global watchpoints are valid in the specified program, and also in all the other programs it calls.

Procedure

To set a watchpoint, start the Debugger and proceed as follows:

Choose Breakpoint ® Create watchpoint or the corresponding pushbutton. The Create Watchpoint dialog box appears:

ashish

Message was edited by:

Ashish Gundawar

Read only

Former Member
0 Likes
1,206

Hi,

Watch points are used to set the break points based on the values in the variables..

Let's say there is a LOOP AT ITAB..and in that there is a work area WA-MATNR which you want to track when it is getting populated..

Then in that program..in the debugging..press create watch point..

In that variable..give WA..press enter..

Now the program will stop at the implicit break point when the work area is populated..

Hope I am clear..

Thanks

Naren

Read only

Former Member
0 Likes
1,206

Hi Sid,

The use of watch point is if u want to analyse the output at a point where u know the value of some variable in your program i.e for eg if u want to stop program execution when the value of some internal table it_vbak-vbeln(sales document number) value reaches '100000' then u can create watchpoint and set this value for ur variable.Then u can check the values of other variables or tables populated for this document number.

Thanks,

Vasudha

Read only

Former Member
0 Likes
1,206

Hi ,

Watdch point is used to stop your program when a field contains the value specified by you .

For eg If you are looping Internal Table containing PO nos from 1 to 500 .

You want to see the processing for PO 250 .

You set watchpoint for field containing PO with the value 250 .

Your Program will stop in Debug when the field has PO 250 .

Hope this Helps.

Thanks,Praveen