2019 Nov 20 1:19 PM
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 )
2019 Dec 06 10:22 PM
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.
2019 Nov 20 1:43 PM
2019 Nov 20 2:07 PM
field( variable) EKPO-EREKZ Changes. I want to track it through out the ME22N.
2019 Nov 20 7:01 PM
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.
2019 Dec 06 5:36 AM
2019 Dec 06 6:33 AM
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.
2019 Dec 06 10:22 PM
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.