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: 

USEREXIT_SAVE_DOCUMENT_PREPARE not getting correct incompletion status

Former Member
0 Kudos

Hi all,

Greetings!

I am trying to check incompletion status at header and item level; and If incomplete, then set delivery block. However, it seems this user exit is not best place (or solution). As soon as save button is pressed, this UE: USEREXIT_SAVE_DOCUMENT_PREPARE is executed before incompletion check is done; therefore, following checks get old values of Vbuk-uvall and vbuk-uvals. Therefore, some scenarios set/do not set delivery block correctly.

Reason for setting Delivery block is to avoid passing requirement,

IF ( NOT vbuk-uvall EQ 'C' ) OR ( NOT vbuk-uvals EQ 'C' ) OR ( NOT vbak-zstatus1 EQ 'X' ).

VBAK-LIFSK = XVBAK-LIFSK = 'Z2' .

ELSE .

IF ( vbak-zstatus1 = 'X' ) AND ( vbak-lifsk = 'Z2' ).

VBAK-LIFSK = XVBAK-LIFSK = ' ' .

[ ENDIF .

this is a bit urgent, and i was wondering of alternatives:

1. Find alternative user exit, to avoid sending requirement.

2. Run incompletion function module in USEREXIT_SAVE_DOCUMENT_PREPARE before above code is executed; therefore vbuk-uvall and vbuk-uvals are accurate >>> is there any function module.

thank you in advance,

Hetal

1 REPLY 1

Former Member
0 Kudos

Hi,

Please do not open multiple threads for the same question. Please close this thread.

Thanks,

Naren