06-09-2011 11:40 PM
Hi all,
I am trying to create a condition value formula in VOFM which will allow me to sum up all the line item quantities in material group '01' and also the price
item 1 70EA $5 mat group 01
item 2 80EA $10 mat group 01
item 3 100EA $8 mat group 02
in which case I can capture the total qty as 150EA and total price as $15.
I want to then calculate the average (150/15 = 10) and place this into a header condition.
I am not sure how to code this in the condition value formula, please advise
thanks,
06-10-2011 7:45 AM
Hi,
Do the following way:
step1: Sort the table by key magerial group.
step2: at end of mat_group
sum.
qty = l_qty.
price = l_price.
endat.
step3: average = l_qty / l_price.
Regards,
Bhaskar
06-10-2011 4:02 PM
Thanks for the response,
which table are you referring to in step 1? How is it stored since it hasn't yet populated a database table?
06-10-2011 10:02 PM
Thanks for the response,
>
> which table are you referring to in step 1? How is it stored since it hasn't yet populated a database table?
This is the table he was referring...
item 1 70EA $5 mat group 01
item 2 80EA $10 mat group 01
item 3 100EA $8 mat group 02
Wherever this data is stored....