11-21-2016 6:09 AM
Hi
Can anyone please tell me how can the Contract Date be updated in VA41/VA42 when creating contract from idoc ORDERS05 IDOC_INPUT_ORDERS. I have tried to update VEDA in USEREXIT_SAVE_DOCUMENT_PREPARE in MV45AFZZ but the Contract Date is not getting updated in VA41. I have already checked the posts in SDN but could not get the answer. Can anyone please help me with this.
Regards
Geeth
11-21-2016 6:51 AM
In USEREXIT_SAVE_DOCUMENT_PREPARE don't change VEDA but move it to a structure, change the structure and call SD_VEDA_MAINTAIN.
Hint: this old user-exit can be now replaced with the BAdI BADI_SD_SALES, you can look at signature of method IF_EX_BADI_SD_SALES->SAVE_DOCUMENT_PREPARE, VEDA is not provided here.
Regards,
Raymond
11-21-2016 8:51 AM
Hi Raymond,
I have copied VEDA to a structure and passed it to fm SD_VEDA_MAINTAIN but the Contract Start Date and End Date are getting cleared in the Contract after it is created. Can you please help me with this.
CALL FUNCTION 'SD_VEDA_MAINTAIN'
EXPORTING
I_VEDA = VEDA
I_FEHGR = TVAK-FEHGR
I_DIALOG_INCOMPLETE = SPACE
IMPORTING
E_DATALOSS = lv_dataloss
TABLES
T_XVBUV = XVBUV
T_HVBUV = HVBUV.
Regards
Geeth
11-21-2016 9:00 AM
Hi Raymond,
Should we change anything in XVBUV and HVBUV structures?
Regards
Geeth
11-21-2016 10:15 AM
Hi
I am able to update the Contract Date in the table VEDA but its displayed as blank in VA42 after Contract is created. Can you please help me with this.
Regards
Geeth