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: 

How to find out a field in debug?

Former Member
0 Kudos

Hi all,

the value of a field is calculated during runtime. I want to use debug to find out how this the value is calculated.

Is there any easy to do it?

Thanks!

Regards,

Hui

Edited by: Hui Wang on Dec 28, 2007 12:03 PM

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

If you know the value which would be taken by the field, then create a Watch point during Debug. Enter the field name and value and Execute. The cursor will stop at the point where the field takes the given value.

Thanks

Sharath.

6 REPLIES 6

Pawan_Kesari
Active Contributor
0 Kudos

Creating a watchpoint on that field will help...

If you create watchpoint as field_value = blank/empty then program will stop executing everytime the value of that field is changed.... hope this will help..

Former Member
0 Kudos

Hi

If you know the value which would be taken by the field, then create a Watch point during Debug. Enter the field name and value and Execute. The cursor will stop at the point where the field takes the given value.

Thanks

Sharath.

Former Member
0 Kudos

U can even put a break point where the calculation and assignment to that field is performed.

Awrd Points if useful

Bhupal

Former Member
0 Kudos

hi,

This way you can go.

First you find the places wherever that variable is used for assigning value bu just opening the program and press the FIND button on the stnd tool bar.

then just type this variable and choose main program radio button.

then you open another session for the same program ( the program should be active to set break point ) and goto the line numbers displayed in the first session find list and then press RED STOP button (ctrl shift F12 ) button on each line number you got from the first session.

then execute the program and you can swithc between these breakpoints using F8 key on the keyboard.

Regds

Sivaparvathi.

Please reward points if helpful

Former Member
0 Kudos

Hi,

You can keep a break point on the calculation part. And execute the program. Program will halt at the point. Double click on the variables and press f5. You can see the values at run time.

Thanks,

Sriram Ponna.

Former Member
0 Kudos

Thanks!

Now I know how to locate the field.

But now I have new question. when I debug a FORM, I find that the local variables are only initlized at the first time when it's called, that means the code in bold below is only executed once?

Anyone can explain it? Or am I wrong

Thanks!

Regards,

Hui

----


  • FORM ABRUFFZ_ERMITTELN *

----


  • Die Abruffortschrittszahl wird in Tabelle IVBEP1 ermittelt *

----


FORM ABRUFFZ_ERMITTELN.

DATA: DA_ABRFZ TYPE F,

DA_LJAHR LIKE BKPF-GJAHR,

DA_GJAHR LIKE BKPF-GJAHR.

DA_LJAHR = VBLB-GJKUN.

DA_GJAHR = DA_LJAHR.

DA_ABRFZ = VBLB-ABEFZ.

LOOP AT IVBEP.

READ TABLE XVBEP INDEX IVBEP-TABIX.

IF SY-SUBRC > 0.

CLEAR XVBEP.

ENDIF.

if not da_ljahr is initial.

if not kuwev-periv is initial.

call function 'FI_PERIOD_DETERMINE'

exporting

i_budat = xvbep-edatu

i_periv = kuwev-periv

importing

e_gjahr = da_gjahr

exceptions

others = 01.

if sy-subrc > 0.

da_gjahr = xvbep-edatu(4).

endif.

else.

da_gjahr = xvbep-edatu(4).

endif.

endif.

if da_gjahr gt da_ljahr.

clear: da_abrfz.

da_ljahr = da_gjahr.

endif.

DA_ABRFZ = DA_ABRFZ + XVBEP-CMENG.

IVBEP-ABRFZ = DA_ABRFZ.

MODIFY IVBEP.

ENDLOOP.

ENDFORM.