SAP Tutorials Blog

 

 


ionfunc Return value

abs Absolute value of argument arg

sign Sign of 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 that is not less than the value of the argument arg is

floor Largest integer that is not greater than the value of the argument arg is

trunc Value of the integer part of the argument arg

frac Value of the decimal places of the argument arg




DATA n TYPE p DECIMALS 2.

DATA M TYPE p DECIMALS 2 VALUE '-3.55'.

n = ABS( M ).  WRITE:  'ABS: ', n.

n = SIGN( M ). WRITE: / 'SIGN: ', n.

n = CEIL( M ). WRITE: / 'CEIL: ', n.

n = FLOOR( M ). WRITE: / 'FLOOR:', n.

n = TRUNC( M ). WRITE: / 'TRUNC:', n.

n = FRAC( M ). WRITE: / 'FRAC: ', n.


output: 


ABS:               3.55

SIGN:              1.00-

CEIL:              3.00-

FLOOR:          4.00-

TRUNC:          3.00-

FRAC:             0.55-


Serkan AKKAVAK

Computer Engineer BSc

SAP Department Manager

Contact : serkurumsal@yandex.com