Skip to Content
-1

Attach PDF file to sales order is madatory

May 08 at 10:49 AM

40

avatar image
Former Member

Dear Experts,

I've done an enhancement for PO copy is mandatory while saving or changing SO, PO copy PDF file attachment is mandatory.

I've implemented MV45AFZZ, userexit_save_document_prepare and my code is

IF sy-tcode = 'VA01' AND sy-tcode = 'VA02'.
IF vbak-auart = 'ZUNT' OR vbak-auart = 'ZDEX' OR vbak-auart = 'ZEXP' OR vbak-auart = 'ZSPA' OR vbak-auart = 'ZRCH' OR vbak-auart = 'ZJO1' .
IF xdrad[] IS INITIAL.
MESSAGE e903(zsd) .
ENDIF.
ENDIF.

ENDIF.

It is functioning properly while creating SO in 'VA01' but while changing the SO in 'VA02' this code is not triggered .

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Raymond Giuseppi May 11 at 12:02 PM
1
IF sy-tcode = 'VA01' AND sy-tcode = 'VA02'.
" It is functioning properly while creating SO in 'VA01

No, it should not perform properly even in creation mode... (Cause the AND, except if 'VA01' = 'VA02' in some Alternate Reality)

NB: Also don't use sy-tcode value but T180-TRTYP, check domain values.

Share
10 |10000 characters needed characters left characters exceeded