Skip to Content
0
Former Member
Jul 21, 2008 at 06:07 AM

Function Module for Rounding Off to the Nearest Value of th given Value

8725 Views

Hi Friends,

Is there any Function Module for Rounding Off the given Value.

For Example.....

Say v_variable contains the value 2.81

Now the decimal is more than 50 paise.. so it should round off to 3.00

Say if the variable v_variable contains the value 2.41

Now the decimal is less than the 50 paisa.. so it should round off to 2.00

How i am doing.

First every thing i am moving to charater format ( Charater Data Type )

after that SPLITTING at decimal positions into two variable like v_rupees and v_paise.

Checking the variable v_paise greater than or equal to 50 paise.

v_variable = CEIL( v_variable)

else.

v_variable = FLOOR(v_variable)

Here my problem is every thing i have to move into charactes data type..

So i am looking for a Function Module..

Please check this and let me help regarding this.

Thanks & Regards:

Sridhar.J