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
1,857

hi,

work flow for watch point....?

3 REPLIES 3
Read only

Former Member
0 Likes
566

Watch points 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 ..

Also check this thread.

Read only

Former Member
0 Likes
566

hi,

Watch points

Set within the ABAP/4 debugger .Watch points are field-specific. This is used to

observe changes to a particular field .The debugger interrupts the program when

fields content change.

When to use watch points.

We can set watchpoints only from within the debugger.They are useful

if we want to interrupt a program only when there is a change in a particular

field or a field string. We can set and remove watch points as

Needed .This , as dynamic breakpoint , does not disturb the other users

of the same program.

Setting Watchpoints.

A watch point is set to interrupt a program when the contents of a

specific field or a string change.

Following are the steps to set a watch point.

On the Debugging editor, enter the table-field.

Press the pushbutton ‘Watchpoint’ on the top left .

A dialog box appears , asking for the ‘local watch point’,

relational operator and comparison field .Fill in as per

requirement.

Fill the appropriate value in the text field next and press

the tick .

Deleting Watchpoints.

Watch points are special break points set for specific fields. To remove a

watch point , the following steps will do.

Choose Goto > Control debugging>Watchpoint.

A display of the watch point occurs , and can be deleted by pressing

‘delete’ checkbox at the end of each Watchpoint .

regards,

sreelakshmi

Read only

Former Member
0 Likes
566

Hi,

Watchpoints allow you the option of monitoring the content of individual variables.

The Debugger stops as soon as the value of the monitored variable changes.

In addition, conditions can be specified. The Debugger also checks whether such a condition is fulfilled.

Detailed Description

Creating a Watchpoint

In the toolbar of the New Debugger, you will find the pushbutton Create Watchpoint . It brings you to the dialog box Create Watchpoint.

Using this function, you can enter the variable to be monitored.

All possible ABAP data structures are allowed here.

-

-


Special Case: Watchpoint for Internal Table

Setting a watchpoint for an internal table may have a negative effect on performance during program runtime and also cause an increase in memory consumption.

The reason for this is that a “clone” of the original data object is created for the watchpoint on a table (as for every other watch point as well).

If the table for which the watchpoint was set has become too large, you must take into consideration that the "clone" will have the same size. With very large internal tables, this can lead to memory bottlenecks.

In some cases, therefore, it can be a good idea to have watchpoints for internal tables active only for short program durations.

Note

In those cases where you are interested solely in changes to the number of lines in the internal table, you can proceed as follows:

Set a watchpoint for a header in the internal table – for example, ."*ITAB[]", possibly with the condition

Not equal to current number: "LINES( ITAB ) <> 1000"

-

-


When you create a watchpoint, the variable taken as the default value for the watchpoint is the variable on which the cursor is currently positioned (in the editor or another tool).

You can only set watchpoints for variables of the current context (program).

For local variables, you can specify whether the watchpoint is to apply to the current procedure instance or to all instances that were ever called for this procedure. Particularly for recursive calls of the procedure, this difference can be of importance.

In addition, you can enter any arbitrary condition in the following box “Condition”. Only if the watchpoint variable changes AND the condition is fulfilled will the Debugger stop.

The condition must match the following syntax:

)“.

In the Breakpoints tool (desktop Breakpoints/Watchpoints / Tab Watchpoints), you can view this reached watchpoint in detail.

The reached watchpoint is marked with a yellow arrow. The old and the new values of the watchpoint variable are at your disposal.

In addition, you can use the pushbutton Compare Variables () to determine the differences between the old and the new variable.

In addition, you can maintain the watchpoint in this view – that is change, activate, deactivate, or delete it.

Validity Area for Watchpoints

· In contrast to breakpoints, watchpoints are only valid locally in the roll area. If a roll area changes, none of the watchpoints defined in the underlying roll area are visible. Also, watchpoints that were created in the New ABAP Debugger cannot be used further in the Classic Debugger (for example, after changing the Debugger) and vice versa.

Cheers,

vasavi.

kindly reward if helpful.