2007 May 17 4:24 PM
Hi all,
here is my request, i need to rund up to the highest value depending on the round up factor entered by user. For exemple he enters 0.5 as factor. What I need to do is for exemple my result that needs to be rounded is 12.35 then the result should be 12.50. Can anyone help on how to do this??
Thanx!
2007 May 17 4:27 PM
u can use the following commands
CEIL <variablename>
FLOOR <variablename>
CEIL <12.4> Output is 13
FLOOR <12.4> Output is 12
Hi all,
here is my request, i need to rund up to the highest value depending on the round up factor entered by user. For exemple he enters 0.5 as factor. What I need to do is for exemple my result that needs to be rounded is 12.35 then the result should be 12.50. Can anyone help on how to do this??
Thanx!
2007 May 17 4:25 PM
2007 May 17 4:26 PM
Check the FM Round documentation if it is of any help to you.
2007 May 17 4:27 PM
Hi,
Here is the example Program
DATA pack TYPE p VALUE '123.456'
DECIMALS 3.
WRITE pack DECIMALS 2.
WRITE: / pack ROUND -2,
/ pack ROUND -1,
/ pack ROUND 1,
/ pack ROUND 2.
Result is
123,46
12.345,600
1.234,560
12,346
1,235You need to use like
<b>WRITE: / pack ROUND Your_field.</b>
Regards
Sudheer
2007 May 17 4:27 PM
u can use the following commands
CEIL <variablename>
FLOOR <variablename>
CEIL <12.4> Output is 13
FLOOR <12.4> Output is 12
2007 May 17 4:39 PM
u have solved ur problem and for curtosy sake just specififed 2 oints and close the thread.....
2007 May 17 5:01 PM
2007 Oct 31 10:28 AM
Hi
pls can u give suggestion for above question
i am also facing same problem
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |