2014 Jul 28 8:45 AM
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.
2014 Jul 28 9:12 AM
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.
2014 Jul 28 9:21 AM
2014 Jul 28 9:33 AM
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
2014 Jul 28 9:37 AM
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.