In SAP ABAP, many built-in math functions, listed below, are provided which can be used to develop advanced mathematical formulas.
Functions | Supported Numeric Types | Description |
abs | (All) | “Calculates the absolute value of the provided argument.” |
sign | (All) | “Determines the sign of the provided argument. If the sign is positive, the function returns 1; if it’s negative, it returns -1; otherwise, it returns 0.” |
ceil | (All) | “Calculates the smallest integer value that isn’t smaller than the argument.” |
floor | (All) | “Calculates the largest integer value that isn’t larger than the argument.” |
trunc | (All) | Returns the integer part of the argument. |
frac | (All) | Returns the fractional part of the argument. |
cos, sin, tan | F | Implements the basic trigonometric functions. |
acos, asin, atan | F | “Implements the inverse trigonometric functions.” |
cosh, sinh, tanh | F | “Implements the hyperbolic trigonometric functions.” |
exp | F | “Implements the exponential function with a base e ≈ 2.7182818285.” |
log | F | Implements the natural logarithm function. |
log10 | F | Calculates a logarithm using base 10. |
sqrt | F | Calculates the square root of a number. |