Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

pricing condition copy from one to other

Former Member
0 Kudos

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.

2 REPLIES 2

Former Member
0 Kudos

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..

0 Kudos

You may have access to the value V_T683S-STUNR which will give you the step number that you are in.