10-24-2007 1:24 AM
hello all.
i am trying to set contract dates on a sales order based on the item category. i have tried using USEREXIT_FIELD_MODIFICATION and USEREXIT_SAVE_DOCUMENT_PREPARE in MV45AFZZ but with no luck. i get the item category vbap-pstyv and use that to determine my contract dates (1yr, 2yr, 3 yr, ect contract) but when i try to append the data into XVEDA, YVEDA, or anything like that the data gets appended (verified by setting breakpoints) but does not actually get set. ie: displaying the sales order after the save shows nothing in the contract fields.
does anyone have any ideas? please advise.
i am running ECC 6.0.
james
10-24-2007 9:53 PM
i solved it myself. the trick is to use USEREXIT_SAVE_DOCUMENT, which is triggered after the save. at that point you have VBELN and can manually insert an entry into VEDA:
veda = xveda.
insert veda.
it's ugly, but it works.
james