‎2007 May 09 10:29 AM
Hi All,
I want to capture the calculated value correctly and without rounding off.
Example: 3501 / 3500 = 1.00028.
But in my variable of type p with decimals 5,it is getting stored as 0.01000.
Can you please help me how to store the correct value and also without rounding off.
My code is as follows,which is in an user exit,and i can not set the attributes to 'Fixed point arithmetic'.
*************************************************************************************
DATA:LV_QTY_TRAILER TYPE P DECIMALS 5,
LV_CASES_PER_TRAILER TYPE MARM-UMREZ.
IF NOT LV_CASES_PER_TRAILER IS INITIAL.
LV_QTY_TRAILER = XVBAP-KWMENG / LV_CASES_PER_TRAILER.
ENDIF.
**************************************************************************************
Thanks & Regards,
Seshagiri.
Note: MARM-UMREZ. is of data type DEC with CHAR5 and
XVBAP-KWMENG is of data type QUAN ,15,3.
‎2007 May 09 10:31 AM
Hi,
simple define define ur variable as type 'F'.
Hope this will help u.
‎2007 May 09 10:31 AM
Hi,
simple define define ur variable as type 'F'.
Hope this will help u.
‎2007 May 09 11:13 AM
Hi,
Thanks for the solution.
I got the correct value by declaring as type F.
Regards
Seshagiri
‎2007 May 09 10:35 AM
Hi ,
if it is a report then goto se38 enter your reportname
then check the attributes radio button then click change and see
whether the check box <b>Fixed Point Arithmetic</b> is Checked
if not please check it.
********
if it is the Function group
then check the attributes of the function group
and see
whether the check box <b>Fixed Point Arithmetic</b> is Checked
if not please check it.
regards,
santosh
Message was edited by:
santosh
‎2007 May 09 11:11 AM
Hi Thanks for the info.
However as already mentioned in my question i can't fix the checkbox,'Fixed point arithmetic'.
Thanks & Regards,
Seshagiri.