Skip to Content
author's profile photo Former Member
Former Member

VOFM (Pricing Condition) FREIGHT - unable to edit Amount value (KOMV-KBETR)

Hi there,

I have a requirement to edit the calculated FREIGHT value in a sales order (under "conditions" TAB in header). If it goes below

a certain value (after partial order has been shipped) I need to set it back to a higher value.

I have looked around the forum and see that this issue seems to be happening to a few people, but I can't see a solution!

In VOFM, I created a new rountine (618) and have assigned this to the correct condition type.

When I insert a break point, it is hitting my code, and I can change values (XKOMV structure). (so all is okay there)

But after hitting my rountine, the XKOMV structure is overwritten by RETTKOMV (in SAP standard code)

so my changes are not held - can anyone suggest a way to get around this?

(* I changed the CONDITION TYPE to C, as suggested elsewhere, but to no effect)

Another approach I was thinking was to use Userexit "userexit_pricing_check" in include LV69AFZZ.

Would this be a better approach, or can anyone suggest a better solution?

Any suggestions appreciated.


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jul 06, 2011 at 03:37 PM

    For benefit of anyone with same issue:

    here is a useful post:

    Link:To Round off my condition value and amount in va02

    and here is my answer to how I solved issue:

    I had a similar problem, I have just solved it today. Here is my solution:

    I wanted to change the "Amount" column in the Pricing elements of the Condtitions TAB in Sales Order Header (KOMV-KBETR).

    Eveytime I tried to change XKOMV-KBETR in my routine , it was overwritten by RETTKOMV.

    There are two parts to the solution:

    First of all, your VOFM routine is called in two places - from KOMV_BEWERTEN( in program LV61AA55 ) where it is overwritten as soon as it leaves your routine, but also from XKOMV_KWERT_ERMITTELN (in program LV61AA43) where it is not overwritten by RETTKOMV.

    Put a break point in program LV61AA43 at this point in the code, and make sure your VOFM routine is called:

    * calculation formula
      IF xkomv-kofrm NE 0.
        wertformel = 'X'.
        xkwert = xkomv-kwert.
        frm_kondi_wert-nr = xkomv-kofrm.
        PERFORM (frm_kondi_wert) IN PROGRAM saplv61a IF FOUND.
        xkomv-kwert = xkwert.

    Still, when I changed XKOMV-KBETR the change was not reflected on screen.

    I needed to MODIFY the structure TKOMV where KSCHL was equal to my Condition Type.

    Use a line of code something like:

     modify tkomv transporting kbetr where KSCHL = 'ZXXX' AND (other conditions here) 

    In my case, the change was then reflected on screen.

    Hope this helps you,


    Add a comment
    10|10000 characters needed characters exceeded

    • Hi,

      We have updated TKOMV as per your advise on the post. The values are not getting updated for the first item of sale order but when we navigate to other items and come back, the values are there and it is looking like the value of item 10 is passed on 20 and the value of 20 is passed on to 30 on..Any help is highly appreciated.



Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.