‎2008 Jan 09 8:09 PM
Hi all,
I need to rund up, for examplo 19,464323 round up with 2 decimals = 19,47
Can you help me ?
Thanks.
‎2008 Jan 09 8:19 PM
Hi,
You can use the Function Module 'MURC_ROUND_FLOAT_TO_PACKED'.
Or you can also use the following code to round up:
DATA: num1 TYPE f, num2 TYPE p DECIMALS 3.
num1 = '1.666666'.
num2 = num1.
WRITE num2.
Reward points if helpfull,
Regards,
Kashyap Ivaturi
‎2008 Jan 09 8:21 PM
no = 19,464323
WRITE no DECIMALS 2 to v_no.
v_no contains 19,47.
a®
‎2008 Jan 09 8:33 PM
hi,
the best way for rounding a variable is the following example:
>data: a(8) type p DECIMALS 5 VALUE '123.45678'.
>data: b(8) type p DECIMALS 2.
>START-OF-SELECTION.
>write:/ a.
>write:/ b.
>move a to b.
>write:/ b.
bye.
Marco
‎2008 Jan 09 11:11 PM
Hi !
If i use for example
a type f
b type p decimals 2.
a = 19,64332333
move a to b or write a to b, the result is 19,64 i need roud up to 19,65
thanks