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

pricing condition copy from one to other

Gurus..

Here is my requirement..

I have 3 conditions in my pricing procedure.

1st one in step 100, lets call it Z001.

The 2nd one somewhere down the line in step 250, lets call it z015.

The last one somewhere down the line in step 300, lets call it z020.

pricing comes to step 100 and Z001 is calculated.

Now when I am in step 250, under certain conditions Z015 shud carry the same value as Z001. For this I have to copy the Z001 value to Z015.

Now when I am in step 300, again upon certain conditions Z020 shud carry the same value as Z001. For this I have to copy the Z001 value to Z020.

I just want to write one routine. Depending on the step, it shud push the value to z015 or z020.

Please let me know how I can achieve this?

FYI - My limitations are I cannot use the subtotal fields, make one condition reference the other, use the FROM field etc. My only go is code something in Alt. Cal. type.

I am confused over the usage of these komv, konv and other tables. what field to look for and stuff like that? basically a newbie to this stuff and confused. Please let me know.

Thanks a lot.

Add comment
10|10000 characters needed characters exceeded

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Aug 02, 2006 at 08:06 PM

    Hi,

    Please try the following and let me know if it works.

    VOFM -> FORMULAS -> CONDITION VALUE. Create a new routine and add the following code.

    Assign the routine number to the condition types Z015 and Z020

    FORM RV64AXXX.

    DATA: S_KOMV LIKE XKOMV.

    • CHECK THE CERTAIN CONDITIONS THAT YOU WANTED TO DO.

    READ TABLE XKOMV INTO S_KOMV WITH KEY KSCHL = 'Z001'.

    IF SY-SUBRC = 0.

    XKWERT = S_KOMV-KWERT.

    XKOMV-KBETR = S_KOMV-KBETR.

    ENDIF.

    ENDFORM.

    Please award the points if it works for you..

    Add comment
    10|10000 characters needed characters exceeded