Skip to Content
avatar image
Former Member

Billing / delivery document should not processed further without attach pdf file in VA02.

we have a requirement to attach .pdf file in VA02 through service for objects for sales order.

Billing / delivery document should not processed further without attach pdf file in VA02.

Please help to how to achieve above requirement using user exit / BADI.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Jan 16 at 09:01 AM

    Speaking without looking in a system, I would consider making use of user statuses in SD documents (setting the status allowing delivery creation should be via custom code) and manual setting of this status by end users would be restricted via authorizations.

    Edit: I hope that the business is aware that checking for teh existence of a pdf attachment is not the same as ensuring that the correct document is attached. :)

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 16 at 12:15 PM

    Hi Sunil,

    During sales order creation or change operation, hope we can assign delivery block(VBAK-LIFSK) and billing block(VBAK-FAKSK) in above exit MV45AFZZ based on the condition whether the document is attached or not. By doing so, the system won't allow delivery(VL01N) and billing(VF01) process.

    Delivery and BIlling Block in Sales Order(VA02) under Sales Tab:

    Regards

    Rajkumar Narasimman

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 16 at 07:01 AM

    Did you try to use the classic user exit USEREXIT_SAVE_DOCUMENT_PREPARE (MV45AFZZ) to check for attachment(s) using some method like CL_BINARY_RELATION=>READ_LINKS (not bypassing buffer)

    • Setting some status in the VA02
    • Checking it in VF01/VL01N/etc.
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 16 at 08:15 AM

    User Exit MV45AFZZ is used only for sales order creation but we need at time of Billing / delivery document save.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 23 at 02:34 AM

    Yes but in MV45AFZZ how to know document is attached or not. so that we can assign delivery block(VBAK-LIFSK) and billing block(VBAK-FAKSK).

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Sunil,

      Check the internal table XDRAD inside exit USEREXIT_SAVE_DOCUMENT_PREPARE (MV45AFZZ) whether the attachment is available or not.

      If the document record is available inside XDRAD, as told before set the delivery block(VBAK-LIFSK) and billing block(VBAK-FAKSK).

      Regards

      Rajkumar Narasimman

      drad-debug.png (50.6 kB)