Skip to Content
avatar image
-1
Former Member

Attach PDF file to sales order is madatory

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 .

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • May 11 at 12:02 PM
    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.

    Add comment
    10|10000 characters needed characters exceeded