Application Development and Automation 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: 
Read only

REGARDING CALCULATION

Former Member
0 Likes
1,022

Hi Friends,

when i am multiplying the reference value (WA_VBFA-RFWRT) and currency (WA_XKOMV-WAERS) . i am getting wrong value . please help on this

WA_VBFA-RFWRT = 5.490

WA_XKOMV-WAERS =  3.67350

by multiplying . system is showing  2016751.500 (WRONG).

please find the attached screen shot.

Regards,

muralidhar.

4 REPLIES 4
Read only

Former Member
0 Likes
973

Hello muralidhar,

The problem is that the program does not set the checkbox: "Fixed point arithmetic".

A solution would be to call a routine in a custom program like this:

PERFORM cal_price(ZCALCULATES)  using WA_VBFA-RFWRT  WA_XKOMV-KKURS

                                                          changing F_RFWRT

I hope you help.


Read only

0 Likes
973

pls can u tell me clearly.

Regards,

Muralidhar

Read only

0 Likes
973

Hi Muralidhar,

You can search 'Fixed point arithmetic' on SCN, see what it is.

What Pau said is right, or you can tick this check box in attribute of your report in SE38.

regards,

Archer

Read only

0 Likes
973

Hi, this is the problem.

    If you mark this checkbox, all calculations in the program will use

    fixed point arithmetic.

    If you do not, packed numbers (ABAP/4 type P, Dictionary types CURR, DEC

    or QUAN) will be treated as integers when they are used in assignments,

    comparisons and calculations, irrespective of the number of decimal

    places defined. Intermediate results in arithmetic calculations will

    also be rounded to the next whole number.

To resolve, do calculations outside the function group, in a custom program with this flag set.

I hope you help.