‎2007 Feb 08 8:42 AM
Hi,
There is a requirement that
in the sales order va02 if some body changed the payment terms then i have to show the error message.
to solve this we have to compare both old value and new vaue of the payment terms.
The problem here is getting the old value i.e if someone change the payment terms and saved it ,the new value is present in that field.Then how to get the old value.
is there any fm module for this to get the oldvalue
‎2007 Feb 08 8:49 AM
I think you can use USEREXIT_SAVE_DOCUMENT_PREPARE which is User exits in the program MV45AFZZ. This user exit can be used to make certain changes or checks immediately before saving a document. It is the last possibility for changing or checking a document before posting.
Here in this form, you can get the old value from database table. It will be available in database table as you have not yet saved the new value.You will also get the new value in the internal table and then you can check old as well as new value.
I hope it helps.
Best Regards,
Vibha
*Please mark all the helpful answers
‎2007 Feb 08 8:49 AM
I think you can use USEREXIT_SAVE_DOCUMENT_PREPARE which is User exits in the program MV45AFZZ. This user exit can be used to make certain changes or checks immediately before saving a document. It is the last possibility for changing or checking a document before posting.
Here in this form, you can get the old value from database table. It will be available in database table as you have not yet saved the new value.You will also get the new value in the internal table and then you can check old as well as new value.
I hope it helps.
Best Regards,
Vibha
*Please mark all the helpful answers
‎2007 Feb 08 8:54 AM
hi shweta,
I think u can get it from the change document tables CDHDR and CDPOS.
Regards...