2023 Nov 08 5:00 AM
Hi, Gurus,
I am working on tcode ME51N. The requirement is that whenever user enters into transaction ME51N for few material numbers, funds center and valuation type should be made default values.
here if i run the transaction me51n, we can see fund centers value is already having 'DUMMY' as default.
Valuation type is blank.
I have written the code in PROCESS_ITEM method as in the blelow image.
I have used set_data also to update the line items.
when I do F8 , I can able to see Valuation type which is empty getting filled with value.
however, the dummy of the funds center is getting overwritten in the debugging mode but when I do F8,
on the screen the DUMMY is visible not the 'p002205' which should be as expected.
I can not able to understand when the value is getting overwritten in debugging mode , how is it that when I do F8 the earlier value is getting displayed.
I could able to see INDIAN on the screen of me51n but funds center dummy is getting replaced with P002205 in debugger but when I do F8 I can see INDIAN but not P02205.
To elaborate more the following are the 2 images.
The above image we can seee fistl is dummy and bwtar is blank (before debugging).
The above image is after debugging. You can see I have used set_data to update ls_mereqitem.
When I do F8,
Here in the funds center it should be P02205 .
The only code I have added is 113 to 131 line number of first image.