When a user changes a Purchase Order (ME22N), I must compare the saved purchased order's items with the previous version of those items to determine if an output must be produced or not.
I do this through the Requirement Output Control (VOFM) for application EF in form KOBEV_903 for Include RV61B903.
Here is my question: How can I compare the changed Purchase Order items with the items before the changes?
- I searched the available global variables, but I can't find "before changes" tables or variables.
- I searched these forums and cannot find a similar question.
Any help is welcome, thank you.
Thank you Vijay, you made me realize that EKPO does not contain the new data yet.
Unfortunately, the new data just entered by the user is what I want to compare the existing data with, so CDHDR and CDPOS will not help me much.
Is there a way to access the new data that is not saved yet?
Here is how I managed to meet that requirement.
In include ZXM06U41 of the EXIT_SAPMM06E_016 (CMOD), I exported the table TEKPO to memory:
EXPORT tekpo TO MEMORY ID 'MY_TEKPO'.
and in include RV61B903 of my Output Requirement (VOFM) I could retrieve it and compare it to the purchase order in the database:
IMPORT TEKPO TO lt_ekpo FROM MEMORY ID 'MY_TEKPO'. * My comparison routine is here