Application Development 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: 

stop methos execution at certain value of the record

Former Member
0 Kudos

Hello

I have to debug program.

I have to stop program execution within a loop if value of the field1 reaches XXX.

I wanted to use watchpoints but it doesnt accept variable like <FS>-field1. Infortunately , I am not able to put a condition like

IF <FS>-field1 = XXX then ....

as I am in production.

Any suggestions?

Thanks in advance.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Watch point on a field symbol can only be set if the field symbol is assigned. Loop through the first iteration or untill the field symbol is assigned. Once field symbol is assigned, you must be able to creat a watch point even with the field options <fs>-fld .

6 REPLIES 6

former_member191735
Active Contributor
0 Kudos

Hello

>

> I have to debug program.

> I have to stop program execution within a loop if value of the field1 reaches XXX.

>

> I wanted to use watchpoints but it doesnt accept variable like <FS>-field1. Infortunately , I am not able to put a condition like

>

> IF <FS>-field1 = XXX then ....

>

> as I am in production.

>

> Any suggestions?

>

> Thanks in advance.

You can debug by giving /h in command field then create watch point for any field for any given value but you cannot write code in debug mode. I mean, there is nothing that you could add your own code in debug in production directly. You have to write some code to do that.

Former Member
0 Kudos

Find the table position of the value you want and then put a watchpoint for SY-TABIX when it's value reaches the index you are looking for.

Rob

0 Kudos

How is it different from Field value? just curious.

0 Kudos

He can't use the field value.

Rob

0 Kudos

Sorry i misread it. you are right.

Former Member
0 Kudos

Watch point on a field symbol can only be set if the field symbol is assigned. Loop through the first iteration or untill the field symbol is assigned. Once field symbol is assigned, you must be able to creat a watch point even with the field options <fs>-fld .