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

about watchpoints

Former Member
0 Likes
2,293

Hi,

It is my first time to use watchpoints to debug,

but after I created one watchpoint in the debugger (I expect the program will stop at the point where order no. = '10000005'), the debugger does not stop and run smoothly.

What's wrong are there?

Thanks!

10 REPLIES 10
Read only

rainer_hbenthal
Active Contributor
0 Likes
1,465

Maybe you need to supply leading zeroes.

Read only

Former Member
0 Likes
1,465

it means there won't be any order no. which is equal to '10000005'. if there means you need to check length of that variable. May be it is having Leading Spaces.

Edited by: subas Bose on Jun 25, 2008 11:42 AM

Read only

GauthamV
Active Contributor
0 Likes
1,465

hi,

there r 2 options.

1. the value is not in ur internal table.

2. u didnt keep the watchpoint properly.

try like this.

after u click on create watchpoint,give

table field : itab-order

operator : =

value : 10000005.

Read only

matt
Active Contributor
0 Likes
1,465

Another option.

Watchpoints don't work with field-symbols.

Read only

Former Member
0 Likes
1,465

Hi Matthew

Please check this simple code, i've successfully placed a watch point on the field symbol <fs> and of course one can only place watch points on field symbols once it is assigned using the ASSIGN statement.


REPORT ztest.
FIELD-SYMBOLS:
  <fs> TYPE i.
DO 10 TIMES.
  ASSIGN sy-index TO <fs>.
  WRITE <fs>.
ENDDO.

Read only

Former Member
0 Likes
1,465

while creating watch point .

please enter proper filed .Example sy-datum

then use logical opration <> , > ,<, =

for confirmation

Enter Sy-datum in dubger..

its comes with Yellow icon... it means that your watch point has been created successully.

if again you are getting problem

in Break point use STATEMENT.

and enter your field name . it will defently stop there.

\[removed by moderator\]

Edited by: Jan Stallkamp on Jun 25, 2008 1:17 PM

Read only

Former Member
0 Likes
1,465

Macy,

i think we cannot create watchpoint for any perticuler entry.we only can create watchpoint for whole itab only.not on like

itab-vbeln.

Amit.

Read only

0 Likes
1,465

Thanks so much for all your reply.

Let me elaborate more about my case.

There is an internal table ITAB holding say order no. (ITAB-VBELN).

In ITAB, there is some checking logic.

It is found that a certain order (e.g. 1011009) returns the wrong result.

Since the no. of orders is too many, I can set the breakpoint at the "loop at ITAB" but I don't want to wait for the ITAB-VBELN to reach the no. '1011009' by pressing F8 each time it hits the breakpoint.

Therefore, I create a watchpoint that ITAB-VBELN = '1011009' (I also tried adding leading zero before it) and expect it stops at '1011009' for me to debug that order.

But it didn't stop...

So can this done by watchpoints or what steps I've missed out?

Many Thanks!

Read only

Former Member
0 Likes
1,465

Hi,

Give the same no. of leading zeroes as the length of the field.

Give it in single quotes: '000001234351'.

Rgds,

Subramanian

Read only

Former Member
0 Likes
1,465

Hi,

I will give you the explanation.

If our code is like the following...

LOOP AT it_tab INTO wa_tab.

IF wa_tab-matnr is not initial.

...

...

ENDIF.

ENDLOOP.

First click the Create Watchpoint button in the debugger session or Shift+F4 (New Abap Debugger).

It will show the create watchpoint screen.

In the variable field, type the variable name that you want the watchpoint.

For example in our case : wa_tab-matnr

Then click the No Additional Condition

In there type your condition.

For Eg : wa_tab-matnr = '100120130'

Now test your program.Your program will stop at that condition.

thanks and Regards

Senthil Kumar Anantham