Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

VA01 User Exit to set Contract Dates

Former Member
0 Kudos

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

1 REPLY 1

Former Member
0 Kudos

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