Showing results for 
Search instead for 
Did you mean: 

Round Off Function

Former Member
0 Kudos

Hi Experts,

I have form where for some value I need to print the Round Off Value. Ex: if the value is 55.90, it wil display 56 and if the value is 55.40 it will display 55. What Logic I can Use in SF coding. Plz help. Its urgent.



Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos


logic has to be build this way

parameters : price like vbap-netwr .

data : val type i .

data : rem type p decimals 2.

rem = frac( price ).

rem = rem * 100.

if rem ge 50.

val = abs( price ).

move val to price.

write price.


write:/ price.


Reward points Please...


Murali Poli

Answers (2)

Answers (2)

Former Member
0 Kudos

check the following Functions

following maths functionas are there in SAP:

abs -Absolute value of the argument arg

sign- Plus/minus sign of the argument arg: -1, if the value of arg is negative; 0 if the value of arg is 0; 1 if the value of arg is positive.

ceil -Smallest integer number that is not smaller than the value of the argument arg.

floor- Largest integer number that is not larger than the value of the argument arg.

trunc- Value of the integer part of the argument arg

frac- Value of the decimal places of the argument arg

Reward points if useful


Murali Poli

0 Kudos


You can use the built in functions <b>ceil</b> and <b>floor</b>.