Skip to Content
0
Former Member
Feb 16, 2007 at 08:01 PM

USEREXIT_SAVE_DOCUMENT_PREPARE not getting correct incompletion status

58 Views

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