2008 Jul 22 2:13 PM
hi,
my requirement is as follows:
When the sales order is saved, i have to check each of the line item data and in that check shipping point country and shipto country(some conditions which i will take care).
Then i need to insert the sales order relevant data into the custom table. data such as SD doc number, item number, customer number etc.
So what I did was, in MV45AFZZ , in the FORM USEREXIT_SAVE_DOCUMENT, implemented the implicit enhancement (code enhancement). There I have to write the code to access all the line items and manipulate as states above. Hope I am clear. Any help with the code ? I am not able to find the correct field names and getting syntax errors. as well i dont know how i loop thru the line items ?
thks
2008 Jul 22 2:30 PM
hi
use this User Exit
USEREXIT_SAVE_DOCUMENT_PREPARE.
the User exit that u r using will get triggered after cata is geting saved not before .
Cheers
Snehi
2008 Jul 22 2:30 PM
hi
use this User Exit
USEREXIT_SAVE_DOCUMENT_PREPARE.
the User exit that u r using will get triggered after cata is geting saved not before .
Cheers
Snehi
2008 Jul 22 2:36 PM
thanks. When will i get the SD document number ??VBELN ?? After save or before save ?
Also won't all the other data entered in the transaction be available in this user exit ??
2008 Jul 22 2:38 PM
hi
The SD document number will be popuilated when this
USEREXIT_SAVE_DOCUMENT_PREPARE triggers
also u will get all this field here
like
SD doc number, item number, customer number .
Cheers
Snehi
2008 Jul 22 2:42 PM
Hi,
U r correct. In the user exit MV45AFZZ and in the FORM USEREXIT_SAVE_DOCUMENT u have item level data in internal table xvbap.
Loop at this table and and do ur validations. But it will not have the new sales order number that will be created(Since it is not created yet).
Thanks,
Vinod.