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

watch point

Former Member
0 Likes
3,989

hi all

please give me info regarding watch points ..how r they used

thanx

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,126

hi,

<u><b>Watchpoint</b></u>

For watchpoints, we need to give some condition and when this condition is satisfied, program will stop

example : if you want to debug only

for matnr value 100 than set watch point

matnr = 100. when value reaches 100 than

program stops at that point.

more at

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

Regards

Reshma

hi all

please give me info regarding watch points ..how r they used

thanx

11 REPLIES 11
Read only

Former Member
0 Likes
3,127

hi,

<u><b>Watchpoint</b></u>

For watchpoints, we need to give some condition and when this condition is satisfied, program will stop

example : if you want to debug only

for matnr value 100 than set watch point

matnr = 100. when value reaches 100 than

program stops at that point.

more at

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

Regards

Reshma

Read only

Former Member
0 Likes
3,126

Hi ganesh,

Watch point are used to put logical break point for a certain condition..Example..If you want to know when the internal table is getting append..Then you have to give the program name and the internal table in the watch point..

Steps to create a watch point.

Start debugging '/H'.

In the debugging screen press the create watch point button in the application tool bar..

In the program give the program name..

in the field give the field name.

In the relational operator given '='

In the comp. field/value give the value ..

Thanks.

Read only

Former Member
0 Likes
3,126

Hai,

Watch point are used to put logical break point for a certain condition..Example..If you want to know when the internal table is getting append..Then you have to give the program name and the internal table in the watch point..

Steps to create a watch point.

Start debugging '/H'.

In the debugging screen press the create watch point button in the application tool bar..

In the program give the program name..

in the field give the field name.

In the relational operator given '='

In the comp. field/value give the value ..

For More Info,

http://help.sap.com/saphelp_nw04/helpdata/en/c6/617cbee68c11d2b2ab080009b43351/frameset.htm

Regards,

Padmam.

Read only

Former Member
0 Likes
3,126

hi,

To set watchpoints:

Choose Debug ® Edit Breakpoints.

Select the Data tab page

Double-click on the next blank line in the list box and enter the name of a variable ].

When the value of this variable or array element is modified during program execution, an implicit breakpoint is set. This interrupts the program and passes control to the debugger.

If you enter xyz in the dialog and this is the name of the array, an attempt to modify any element of the array causes the watchpoint to be hit.

If you set a watchpoint for xyz, attempts to change the values of xyz[1], xyz[2], xyz[3] or any other element in the array all cause the watchpoint to be hit.

If you set a watchpoint for a.b.c, this detects any changes made to a[1].b.c, a[2].b.c and so on. If you only want to monitor the element a[1].b.c (and no other a[*].b.c element), you must specify a[1].b.c explicitly as the watchpoint name.

If required, you can define a context for a watchpoint by specifying a function or file name.

The context acts as an additional filter, which specifies that a watchpoint is active only within the specified function or file. This means that any changes made to the variable in any other function or file are ignored.

Choose OK.

To edit watchpoints you have set:

Choose Debug ® Edit Breakpoints.

Select the Data tab page.

To enable or disable watchpoints, select or deselect them in the list

To delete a single watchpoint, select it and choose Remove

To delete all watchpoints, choose Remove All

Choose OK.

Hope this helps.

Reward if helpful.

Regards,

Sipra

Read only

0 Likes
3,126

hi sipra

can i give relation other than '=' 'or' between fields?

can i give condition to one field?...like bukrs = s111

thanx

Read only

Former Member
0 Likes
3,126

Hi,

Here is the Some more information.

Watchpoints

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.

Changing Watchpoints

1. Choose Goto &#61614; Control debugging &#61614; Watchpoints or the Watchpoints pushbutton to display the watchpoint list. The following dialog box appears:

2. Choose the pencil icon in the line containing the watchpoint you want to change.

3. Change the watchpoint attributes in the Create/Change Watchpoint.

3. Choose ENTER .

Deleting Watchpoints

You cannot delete watchpoints by choosing Breakpoint &#61614; Delete or Breakpoint &#61614; Deactivate/activate. Instead, proceed as follows:

1. Choose Goto &#61614; Control debugging &#61614; Watchpoints or the Watchpoints pushbutton to display the watchpoint list.

2. Choose the trashcan icon in the line containing the watchpoint you want to delete.

Memory Monitoring with Watchpoints

You can use watchpoints to display changes to the references of strings, data and object references, and internal tables. By placing an ampersand (&) in front of the object name, you can display the reference in question in hexadecimal format. With internal tables, you can also display the table header by placing an asterisk (*) at the beginning of the name.

&objectname Displays the references of strings, internal tables as well as data and object references

*itab Displays the table header of the internal table itab

Example

If a watchpoint is set for the object in question at runtime, the program is stopped as soon as the reference is changed. A short dump can be intercepted in this way to stop the program being terminated when the memory is overwritten.

Regards,

Chary.

Read only

0 Likes
3,126

hi rama

i have created a watch point for a field of a internal table and when i clicked the execute button it is giving me the final output without giving me any info regarding the watch point created.

Read only

Former Member
0 Likes
3,126

Hi,

Use: It is used to stop proc when a varible/fld will get a specific value at Run time.

enter into the debugger mode

click on watch point

enter fld/varialbe

enter equality operator (equal default)

enter value.

Press F8 " Now it will stopp at command where fdl has user given value

Jogdand M B

Read only

Former Member
Read only

Former Member
0 Likes
3,126

Whenever a value is given to a variable and when executing if that value comes then it will stop the execution at that position.

enter into the debugger mode

click on watch point

enter fld/varialbe

enter equality operator (equal default)

enter value.

Press F8 " Now it will stopp at command where fdl has user given value

Read only

Former Member
0 Likes
3,126

hi ganesh,

watch points are some conditions based on which we can test whether particular variable is having which value [ whether it is having reqiured value or not ]

navigation

enter into the debugger mode by givinh /h in command box

click on watch point

enter fld/varialbe

enter equality operator (equal default)

enter value.

Press F8

so that u can test the value of that particular variable.

if helpful reward some points.

with regards,

suresh babu aluri.