‎2008 Jan 10 8:53 AM
Hi
i have a field WS_TOTAL_KWMENG type KWMENG which is QUAN field
the value of this is 20.000 , i want to round it
round FM is not working
Please suggest
‎2008 Jan 10 8:55 AM
Hi,
Declare a integer variable, Move Quantity variable value to Integer Variable.
Regards,
Satish
‎2008 Jan 10 8:55 AM
Hi,
Declare a integer variable, Move Quantity variable value to Integer Variable.
Regards,
Satish
‎2008 Jan 10 9:05 AM
Hi Chari,
You can use the Function Module MURC_ROUND_FLOAT_TO_PACKED.
Or you can check the following code.Here,two variables num1 and num2 are defined with float and packed data types.When num1 is moved to num2,it is automatically rounded off as the decimals given as 2 in num2.
DATA: num1 TYPE f value '19.468323',
num2 TYPE p decimals 2.
num1 = '19.468323 '.
num2 = num1.
WRITE num2.
Reward if helpfull,
Thanks,
Kashyap
‎2008 Jan 10 9:07 AM
Hi Chari,
try this code...
DATA : a type float, b type num.
a = '12.221111'.
b = a.
write b.
Reward if useful...
Regards,
Goutham.