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: 

when condition is zman the delivery block should be filled with 09 in va02

Former Member
0 Kudos

Hi,

IN VA02 TCODE THE DELIVERY BLOCK SHOULD BE FILLED WITH 9 WHEN THIS CONDITION SHOULD BE SATISFIED.

WHEN KSCHL = ZMAN

KOAID = 'B'

KINAK IS INITIAL

VBAK- LIFSK SHOULD BE FILLED WITH '09'

FOR THAT I HAVE WRITTEN THE FOLLOWING CODE BUT THE DELIVERY BLOCK IS NOT SETTING TO 9 CAN U TELL ME I S THAT ANY WRONG IN THAT CODE.

read table xkomv with key kposn = xvbap-POSNR kschl = 'ZMAN'.

if sy-subrc = 0.

If XKOMV-KOAID = 'B' and XKOMV-KINAK = ' '.

vbak-lifsk = '09'.

ENDIF.

endif.

Moderator message: please do not write in all upper case.

Edited by: Thomas Zloch on Nov 18, 2010 9:15 AM

2 REPLIES 2

former_member404244
Active Contributor
0 Kudos

Hi,

Use the modify statement .


vbak-lifsk = '09'.
modify vbak

Regards,

Nagaraj

Former Member
0 Kudos

Which user exit is being used ? You should write the code in MV45AFZZ, form-routine : USEREXIT_SAVE_DOCUMENT_PREPARE or USEREXIT_MOVE_FIELD_TO_VBAK.

Edit : If you are using USEREXIT_SAVE_DOCUMENT_PREPARE, update the structure field XVBAK-LIFSK alongwith VBAK-LIFSK.

Edited by: Vinod Kumar on Nov 18, 2010 10:20 AM