• January 8, 2026
  • Admin
  • 0

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.

Leave a Reply

Your email address will not be published. Required fields are marked *