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: 

Update Contract Start and End Date in Contract

Former Member
0 Kudos

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

4 REPLIES 4

raymond_giuseppi
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Raymond,

Should we change anything in XVBUV and HVBUV structures?

Regards

Geeth

Former Member
0 Kudos

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