• 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 | 16+ Years' Experience in SAP | Sharing Practical SAP Knowledge | Engineering Graduate with Expertise in SAP Architecture

https://fiowelt.com