• March 3, 2026
  • Kishore Thutaram
  • 0

Update Fixed Qty flag based on a condition during sales order creation/change

Business Scenario:

“Update Fixed Qty flag for Sales order items based on applicable item categories”

Steps: Open User Exit Include : MV45AFZZ

Form routine: SAVE_DOCUMNENT_PREPARE – this will trigger before saving of a sales order.

Implement the below code


 IF T180-TRTYP = 'V' OR T180-TRTYP = 'H' . " only create or change

     
*--* Update Delivery  Quantity Fixed - if eligible item cat. is in order
      LOOP AT xvbap ASSIGNING FIELD-SYMBOL() where pstyv = 'XTAC'.
  *--* add additional conditions if any            
            -fixmg = abap_true.  "Delivery Date and Quantity Fixed
        
      ENDLOOP.
endif.
   
    

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