cancel
Showing results for 
Search instead for 
Did you mean: 

Pricing procedure calculate

Former Member
0 Kudos

Hi,

I need to create a new condition to sum other conditions. I put the steps in "From - To", but did not calculate the sum

How to do the condition sum values of other conditions?

Is there a standard formula?

Tks

Filipe Borges

Accepted Solutions (0)

Answers (4)

Answers (4)

0 Kudos

Hi Filipe,

for your query :

"need to create a new condition to sum other conditions"

you have to create a new routine in VOFM under Formulas -> Condition Value.

************************************

The code will be as under :

data : kwert_1 like xkomv-kwert .

data : it_komv like xkomv occurs 0 with header line.

refresh it_komv.

clear it_komv.

it_komv[] = xkomv[].

kwert_1 = 0.

loop at it_komv.

  if it_komv-kschl = 'ZCT1' or  it_komv-kschl = 'ZCT2'.

      kwert_1 = kwert_1 + it_komv-kwert.

  endif.

endloop.

xkwert = kwert_1.

xkomv-kbetr = kwert_1.

*******************************

After creating the routine, assign it to the condition type in which you want the sum.

Regards

former_member657193
Contributor
0 Kudos

HI

Plz follow this

Step Condition From TO

First condition 10 - Z001 -

Second condition 20 -Z002-

Balk Step with description 30 -Sub Total- 10 20

Third Condition 40 -Z003- 30 30

Here create your third condition type as % condtion type i.e Z003 will of percentage type

Now you create a Access sequebce and table with your sales Org field only or company code only. Maintin a record of 100% for that.

In VK11 - z003 = 100 %

Now in your pricing procedure as you are seeing, step 40 will copy the value of step 30 into your condition type Z003. Your subtotal is the SUM of = Z001 + Z002.

Hope this will solve your problem

Regards

Rishi............

Edited by: Rishi on Nov 30, 2010 7:24 AM

Former Member
0 Kudos

hei,

to get SUM for 2 of ur condition type, we no need to add new condition type

do this in pricing procedure: (let say 2 conds are XXXX and YYYY and you want sum two of them)

Step Ctyp Desc Fro To suTot

10 XXXX ctyp XXXX

20 YYYY ctyp YYYY

21 Sum 10 21 1

so in line 21 you we get sum of cond type XXXX and YYYY. the value of sum is storage in VBAP-KZWI1.

hope it helps you

Best Regard,

Hendry

Former Member
0 Kudos

hi

this is to inform you that

your requriment is:

to add all the condition types and store the value in one condition type.

for this SUB TOTAL's calculation procedure is there.

but your requriment seems some thing different.

as per my unnderstanding goes you need to add all the conditions and store that value in new condition type called for eg.ZXXX.

for this create a small pricing routine which will be done by an ABAPER.

he will do some arthematic calculations in your requriment he will add all the condition types and store in some buffer and trigers when the pricing procedure trigers.

this solves your requriment.

please chec with your abaper and update the forum

regards

balajia