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: 

SAP debugging in ABAP

vinothkumar_k
Explorer
439

Any way to find the particular field changes throughout the whole program like ME22N. For Creating watchpoint ,we need to know program name to find the field changes, any method to find the field changes whatever the program name.( script debugging method )

1 ACCEPTED SOLUTION

Jelena_Perfiljeva
Active Contributor
0 Kudos
153

This particular field (EKPO-EREKZ) is not used that much and it's not like it's changing a lot throughout the transaction. Through "where used" for the data type you can find BADI MRM_FINAL_INVOICE_IND and that's probably all you need.

In the worst case, I'd evaluate the call stack and go from there. But in general, there is no way to do what you are wanting easily because the variables have limited scope and life span. Even if a variable is declared as global somewhere on top, it could be very difficult to track the exact change point because it could be simply filled with the value from another variable. And where that variable comes from - go figure. Such quests can lead one down a rabbit hole easily.

6 REPLIES 6

Sandra_Rossi
Active Contributor
153

What means "field" in your context?

vinothkumar_k
Explorer
0 Kudos
153

field( variable) EKPO-EREKZ Changes. I want to track it through out the ME22N.

srikanthnalluri
Active Participant
153

Yes you can create watch point on the field EKPO-EREKZ to track field changes in the script debugging, you can find similar examples in blogs.

cdprasanna
Active Participant
0 Kudos
153

hi,

check this blog abap-debugger-breakpoints-and-watchpoints. might help you.

Thanks,

Prasanna

FredericGirod
Active Contributor
0 Kudos
153

Yes you need the program because a variable existence is linked to a program or to a subroutine/method.

Because if your ME22n is calling a FM with the field in Input/Output you will see the change at the return of the FM.

If your variable is localy defined you will saw the change only inside the method.

So, for me the simple way is to explore the CALL STACK in the debugger to find the place of the modification.

v_my_value as 3 existences here, in each method. They are different but with the same name.

method my_first_method.
  my_second_method( v_my_value = v_my_value ).
endmethod.


method my_second_method.
  my_thid_method( v_my_value = v_my_value ).
endmethod.

method my_first_method.
  v_my_value = 'toto'.
endmethod.

Jelena_Perfiljeva
Active Contributor
0 Kudos
154

This particular field (EKPO-EREKZ) is not used that much and it's not like it's changing a lot throughout the transaction. Through "where used" for the data type you can find BADI MRM_FINAL_INVOICE_IND and that's probably all you need.

In the worst case, I'd evaluate the call stack and go from there. But in general, there is no way to do what you are wanting easily because the variables have limited scope and life span. Even if a variable is declared as global somewhere on top, it could be very difficult to track the exact change point because it could be simply filled with the value from another variable. And where that variable comes from - go figure. Such quests can lead one down a rabbit hole easily.