2007 Jun 15 6:06 AM
ex .data : a type p decimals 2.
if value of a = 10.22
then it should give a = 10.
if value of a = 10.52
then it should give a = 11.
if there is any predefine function then plz relpy
ex .data : a type p decimals 2.
if value of a = 10.22
then it should give a = 10.
if value of a = 10.52
then it should give a = 11.
if there is any predefine function then plz relpy
2007 Jun 15 6:07 AM
Hi,
Use the function module round..
Check this link
http://sap.ittoolbox.com/groups/technical-functional/sap-dev/how-to-round-the-decimal-values-408071
Thanks
Naren
2007 Jun 15 6:11 AM
hi nilima,
just define like this your data type,
.data : a type p.
or use FM 'CO_R0_FLOAT_ROUND_RESULT' to give the round number .
reward points if helpful,
regards,
seshu.
2007 Jun 15 6:12 AM
try this
data : a type p decimals 2,
b type i.
a = '10.22'.
b = abs( a ).
write : / b.
a = '10.52'.
b = abs( a ).
write : / b.
regards
shiba dutta
2007 Jun 15 6:14 AM
2007 Jun 15 6:17 AM
Hi
try using FLOOR
for more infor check the DEMO REPORT demo_data_function .
regards
Shiva
2007 Jun 15 6:52 AM
hi,
using CEIL AND FLOOR functions u get desired o/p
as
ex .data : a type p decimals 2.
if value of a = 10.22.
CEIL a.
then it should give a = 10.
if value of a = 10.52,
FLOOR a.
then it should give a = 11.
if helpful reward some points.
with regards,
suresh.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |