2007 Mar 15 6:10 PM
Is there any function Module that will roynd a number .
Eg
3.3 = 4,
3.6 = 4.
I have done using MOD and DIV functions but was wondering if a FM exists.
Madhu.
2007 Mar 15 6:14 PM
If you always want to round up to the nearest whole number you can use the CEIL keyword.
data: p1 type p decimals 2 value '3.33'.
data: i type i.
i = ceil( p1 ).
write:/ i.
Regards,
Rich Heilman
2007 Mar 15 6:13 PM
2007 Mar 15 6:14 PM
2007 Mar 15 6:17 PM
I always want to round to the upper number.
Eg , 3.7 = 4 and even 3.1 = 4.
MAdhu
2007 Mar 15 6:18 PM
Hi,
Please try this.
data: p1 type p decimals 2 value '3.3',
p2 type p decimals 2 value '3.7',
i type i.
i = p1.
write: / i.
i = p2.
write: / i.
Regards,
Ferry Lianto
2007 Mar 15 6:23 PM
Hi,
IF You want to Round up...You have to use CEIL
If you want to Round down..You have to use the function FLOOR
THanks,
Naren
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |