Application Development and Automation 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: 
Read only

VA41 - User Exit

Former Member
0 Likes
2,395

How Do everyone.

I am trying to assign the system time to a field I have

added to the VEDA contracts table. I have also added the

code in the FORM USEREXIT_SAVE_DOCUMENT_PREPARE:

VEDA-ZZBEGTIME = sy-uzeit

However, when I run the transaction VA41 and save the

document the new field is still empty. I have tried

using *VEDA and XVEDA but still the field remains empty.

Any ideas anybody please?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,380

Hi,

Do you see values in VEDA in USEREXIT_SAVE_DOCUMENT_PREPARE. If that is the case then try calling function module SD_VEDA_MAINTAIN after filling your ZZ field. Some thing like the following,

CALL FUNCTION 'SD_VEDA_MAINTAIN'

EXPORTING

I_VEDA = VEDA

I_FEHGR = "TVAK/TVAP-FEHGR depending on header/item

I_DIALOG_INCOMPLETE = SPACE

IMPORTING

E_DATALOSS = DA_DATALOSS

TABLES

T_XVBUV = XVBUV

T_HVBUV = HVBUV.

Hope this helps..

Sri

5 REPLIES 5
Read only

Former Member
0 Likes
1,380

Hi andy,

i think you need to set the UPDKZ update indicator field of XVEDA to 'U' . Also check before setting the indicator and the value for the zfield that the transaction is in change mode or not.

Then it should work .

Regards,

Swapnil

Read only

Former Member
0 Likes
1,380

Hi Andy,

Can you try with HVEDA and KVEDA.

Regards,

Raj

Read only

Former Member
0 Likes
1,380

Still no success guys.

Anymore suggestions?

Read only

Former Member
0 Likes
1,381

Hi,

Do you see values in VEDA in USEREXIT_SAVE_DOCUMENT_PREPARE. If that is the case then try calling function module SD_VEDA_MAINTAIN after filling your ZZ field. Some thing like the following,

CALL FUNCTION 'SD_VEDA_MAINTAIN'

EXPORTING

I_VEDA = VEDA

I_FEHGR = "TVAK/TVAP-FEHGR depending on header/item

I_DIALOG_INCOMPLETE = SPACE

IMPORTING

E_DATALOSS = DA_DATALOSS

TABLES

T_XVBUV = XVBUV

T_HVBUV = HVBUV.

Hope this helps..

Sri

Read only

0 Likes
1,380

Thanks Sri, you are a star!

I can now populate the new fields.

Cheers