2007 Jun 06 8:13 AM
Hi All,
I have a Field which have the Expected values like 0.29846.
I want this field to be Rounded to Four Digits using ROUND Fn Module.
Help me out.... Points will be rewarded immediately.
2007 Jun 06 8:17 AM
report ychatest message-id zz..
data : orig_amt type p decimals 10 value '0.29846',
round_amt type p decimals 4.
call function 'ROUND'
exporting
decimals = 4
input = orig_amt
sign = '-'
importing
output = round_amt
exceptions
input_invalid = 1
overflow = 2
type_invalid = 3
others = 4.
write : round_amt.
Hi All,
I have a Field which have the Expected values like 0.29846.
I want this field to be Rounded to Four Digits using ROUND Fn Module.
Help me out.... Points will be rewarded immediately.
2007 Jun 06 8:16 AM
Hi
Instead of fun module
try with the following Function commands
<b>abs</b> -Absolute value of the argument arg
<b>sign</b>- Plus/minus sign of the argument arg: -1, if the value of arg is negative; 0 if the value of arg is 0; 1 if the value of arg is positive.
<b>ceil</b> -Smallest integer number that is not smaller than the value of the argument arg.
<b>floor-</b> Largest integer number that is not larger than the value of the argument arg.
<b>trunc-</b> Value of the integer part of the argument arg
<b>frac-</b> Value of the decimal places of the argument arg
Reward points for useful Answers
Regards
Anji
2007 Jun 06 8:17 AM
report ychatest message-id zz..
data : orig_amt type p decimals 10 value '0.29846',
round_amt type p decimals 4.
call function 'ROUND'
exporting
decimals = 4
input = orig_amt
sign = '-'
importing
output = round_amt
exceptions
input_invalid = 1
overflow = 2
type_invalid = 3
others = 4.
write : round_amt.
2007 Jun 06 8:57 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |