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

Problem in calculating moving a price...

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


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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Feb 06, 2012 at 02:43 PM

    In your program attributes, do you have the 'Fixed point arithmetic' flag set?

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.