• January 20, 2026
  • Kishore Thutaram
  • 0

Control Sales Order Confirmation Output by Using the Output Control Routine

This QuickFix explains how to control Sales Order confirmation output in SAP using an Output Control routine.

Steps:

Go to VOFM Transaction

Select Requirements -> Output Control

Create a new requirement routine by selecting new entries in change mode.

Ex : 901 – recommended with 9 series

Assign newly created routine in output determination procedure – Activity by functional

Logic inside the routine

    
FIELD-SYMBOLS :  TYPE tab_xyvbap,
   TYPE tab_xyvbap,

"Control output and send only when  rejection reason is added to item.
      ASSIGN ('(SAPMV45A)YVBAP[]') TO . "Changes only
      ASSIGN ('(SAPMV45A)XVBAP[]') TO .  "All current

      "check if rejection reason is added.
      LOOP AT  ASSIGNING FIELD-SYMBOL() WHERE abgru IS NOT INITIAL.
        IF  IS ASSIGNED AND  IS NOT INITIAL.
          DATA(ls_yvbap) = VALUE #( [ posnr = -posnr ] OPTIONAL ).
          IF ls_yvbap-abgru IS INITIAL.
            "if rejection reason is added, check completion status
            IF komkbv1-uvall = 'C' AND komkbv1-uvals = 'C'.
              sy-subrc = 0.
              RETURN.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDLOOP.

 sy-subrc = 4.
    
    

Kishore Thutaram

"SAP solution architect with a strong problem-solving mindset, sharing practical SAP S/4HANA and ABAP insights from real-world projects."

https://fiowelt.com