• January 20, 2026
  • Kishore Thutaram
  • 0

Update Condition Value in Sales Order using Alternative Calculation routine

This QuickFix explains how to update Sales Order pricing in SAP using an Alternative Calculation Routine to apply custom pricing rules.

Steps:

Open Transaction Code : VOFM

Select Formulas->condition Value

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

Ex : 901 – recommended to Use 9 series

Assign new routine in pricing procedure – activity by functional

Logic inside the routine

    
        *--* Read the condition value from Condition Types PFS1 and XFCT .
** PACC = PFS1 - PFCT
    DATA(ls_xkomv_1) = VALUE #( xkomv[ kposn = xkomv-kposn kschl = 'PFS1' ] OPTIONAL ).
    DATA(ls_xkomv_2) = VALUE #( xkomv[ kposn = xkomv-kposn kschl = 'PFCT' ] OPTIONAL ).
    IF ls_xkomv_1-kwert IS NOT INITIAL.
      xkomv-kwert = ls_xkomv_1-kwert - ls_xkomv_2-kwert.
      xkwert = xkomv-kwert.
      xkomv-kbetr = xkwert.
    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