Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

rounding off till 2decimal place

Former Member
0 Kudos

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

6 REPLIES 6

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi,

Try FM ROUND

Regards,

Surinder

P561888
Active Contributor
0 Kudos

hi,

both ways are good...but declaring the var with decimal 2 is good compare to the Fm...

regards,

bharani..

Former Member
0 Kudos

thanks to all