2008 Mar 07 7:33 AM
Hi
I want to pick up decimals only in packed value.
Example
data: I_TOTAL LIKE J_1ITAXVAR-J_1ITAXAM1.
round off bellow value to my conditions.
if value is 1994.50 and bellow .50. i want to change 1994.
if value is 1994.51 and above .51 then only change to 1995
which function module works like as above my conditions.
or send to the detail code
Please send me as early as possible.
Regards,
Hari
Hi
I want to pick up decimals only in packed value.
Example
data: I_TOTAL LIKE J_1ITAXVAR-J_1ITAXAM1.
round off bellow value to my conditions.
if value is 1994.50 and bellow .50. i want to change 1994.
if value is 1994.51 and above .51 then only change to 1995
which function module works like as above my conditions.
or send to the detail code
Please send me as early as possible.
Regards,
Hari
2008 Mar 07 7:53 AM
use floor ,ceil and trunc statements.You will get the required result.
2008 Mar 07 8:00 AM
hi Hari,
Use ROUND FM to achieve this ...
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_am. Regards,
Santosh
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |