10-07-2008 8:06 AM
hi,
i have a requirement that if i am getting output as: 6.447 then it will be rounded off as 6.45
can anyone tell me which FM to use for this and what parametrs i hav to pass in it?
thanks in advance
rahul
Edited by: RAHUL SHARMA on Oct 7, 2008 9:06 AM
10-07-2008 8:08 AM
for this you dont need fm you can declare variable like this
pass your value to var it will take care of it.
data: var type p decimals 2.
10-07-2008 8:09 AM
Hi,
You can go to SE37 ( FM initial screen)
give * ROUND * or * ROUNDING * and then search for existing FMs.
Regards,
Pramod
Edited by: Pramod Manjunath on Oct 7, 2008 12:41 PM
10-07-2008 8:09 AM
hi,
No need of any function module to round off
just declare the required variable with data type P and mention the 2 decimal places.
Example:
Var1 type P decimals 2.
10-07-2008 8:12 AM
10-07-2008 8:14 AM
hi,
both ways are good...but declaring the var with decimal 2 is good compare to the Fm...
regards,
bharani..
10-07-2008 8:19 AM