02-06-2012 7:57 AM
Hi Experts,
I am Modifying Standard Program RM07MLBD(Tcode : mb5b) I have copied to zprogram in my program i am adding few fields in program my fields are closing stock qty(by document by document) closing stock value(price document by docment)
Price(Moving avg price by document by document)
i am calculating a price
show example :
mb5bqty mb5bprice cs cv(closing value)
0 MT 249.17- 2,682.180 9,200,499.51
329- MT 1,248,516.14- 2,353.180 7,951,983.37
1.960 MT 93,337.25 2,375.140 8,045,320.62
6.550 MT 70,342.96 2,391.690 8,115,663.58
2.110 MT 93,974.80 2,413.800 8,209,638.38
Now i want to calculate the moving avg price.
mov = cv / cs.
i wrote the same logic in my program
it will show like this
3.43
but the actual value is 3430.23
i am declaring the variable
data: mov type p decimals 2,
cv type p decimals 3,
cs type p decimals 2.
02-06-2012 2:43 PM
In your program attributes, do you have the 'Fixed point arithmetic' flag set?