SAP CL_ABAP_MATH OO Class - ABAP Mathematics Library
CL_ABAP_MATH is a standard SAP object class available within R/3 SAP systems depending on your version and release level. You can view/maintain the class details by entering its name into the relevant SAP transactions such as SE24, SE80 or even SE84. Below is the documentation available for class CL_ABAP_MATH including details of:
- Interface class implementations
- Inheritance details
- Methods defined within class ( including link to full details )
- Attributes ( including initial values )
- Class Events
Method list of CL_ABAP_MATH SAP class
A method is a coding block that performs a certain procedure (i.e. ABAP functionality) on an object within the overall SAP class. In simple terms if the object is an SAP database table a method could be the procedure to add a record or to delete a record. If you are new to OO in many respects, the implementation of a method is similar to a function module and can be called in a very similar way using CALL METHOD.
Instead of "CALL FUNCTION", Methods are referenced using the following syntax: CALL METHOD =>methodname EXPORTING/IMPORTING...
Method Name | Description | Visability |
GET_DB_LENGTH_DECS | DF16_DEC/DF34_DEC: Length and Decimal Places in DB | Public |
CALL METHOD cl_abap_math=>GET_DB_LENGTH_DECS...more details | ||
GET_EXPONENT | Exponent of DECFLOAT Number or floor( log10( x ) ) | Public |
CALL METHOD cl_abap_math=>GET_EXPONENT...more details | ||
GET_MAX_DB_VALUE | Maximum Possible Value In Database | Public |
CALL METHOD cl_abap_math=>GET_MAX_DB_VALUE...more details | ||
GET_NUMBER_OF_DIGITS | Number of Significant Places in a DECFLOAT Number | Public |
CALL METHOD cl_abap_math=>GET_NUMBER_OF_DIGITS...more details | ||
GET_SCALE | Returns Scale of a DECFLOAT Number | Public |
CALL METHOD cl_abap_math=>GET_SCALE...more details | ||
GET_SCALE_NORMALIZED | Number of Significant Places Without Following Zeros | Public |
CALL METHOD cl_abap_math=>GET_SCALE_NORMALIZED...more details | ||
| ||
NORMALIZE | Normalization of a DECFLOAT Number | Public |
CALL METHOD cl_abap_math=>NORMALIZE...more details | ||
ROUND_F_TO_15_DECS | Variable of ABAP Type F Rounded to 15 Decimal Places | Public |
CALL METHOD cl_abap_math=>ROUND_F_TO_15_DECS...more details |
CL_ABAP_MATH attributes
List of attributes within class CL_ABAP_CHAR_UTILITIES. These can be referenced using the following syntax CL_ABAP_CHAR_UTILITIES=>. Although depending on where you are inserting the ABAP code you do need to check if the attribute is public or private.
Name | Level | Description | Initial Value | Type | Visability |
ENGINEERING | Constant | Output: Technical | 06 | LIKE OUTPUTSTYLE | Public |
MAX_DECFLOAT16 | Constant | Maximum Possible Value | '9.999999999999999E+384' | LIKE DECFLOAT16 | Public |
MAX_DECFLOAT34 | Constant | Maximum Possible Value | '9.999999999999999999999999999999999E+6144' | LIKE DECFLOAT34 | Public |
MAX_INT4 | Constant | Biggest Possible Value for Type 1 | 2147483647 | LIKE I | Public |
MAX_INT8 | Instance Attribute | LIKE | Private | ||
MIN_DECFLOAT16 | Constant | Smallest Positive (not Subnormal) Value | '1E-383' | LIKE DECFLOAT16 | Public |
MIN_DECFLOAT34 | Constant | Smallest Positive (not Subnormal) Value | '1E-6143' | LIKE DECFLOAT34 | Public |
MIN_INT4 | Constant | Smallest Possible Value for Type 1 | -2147483648 | LIKE I | Public |
MIN_INT8 | Instance Attribute | LIKE | Private | ||
ROUND_CEILING | Constant | Round to Positive Infinity | 0 | LIKE I | Public |
ROUND_DOWN | Constant | Round to Zero | 5 | LIKE I | Public |
ROUND_FLOOR | Constant | Round to Negative Infinity | 6 | LIKE I | Public |
ROUND_HALF_DOWN | Constant | Round to zero if value is exactly half | 4 | LIKE I | Public |
ROUND_HALF_EVEN | Constant | Round so last digit is an even no. if value is exactly half | 3 | LIKE I | Public |
ROUND_HALF_UP | Constant | Round away from zero if value is exactly half | 2 | LIKE I | Public |
ROUND_UP | Constant | Round away from zero | 1 | LIKE I | Public |
SCALE_PRESERVING | Constant | Output: Scale Preserving | 02 | LIKE OUTPUTSTYLE | Public |
SCALE_PRESERVING_SCIENTIFIC | Constant | Output: Scale Preserving Scientific | 05 | LIKE OUTPUTSTYLE | Public |
SCIENTIFIC | Constant | Output: Scientific | 03 | LIKE OUTPUTSTYLE | Public |
SCIENTIFIC_WITH_LEADING_ZERO | Constant | Output: Scientific with Leading Zero | 04 | LIKE OUTPUTSTYLE | Public |
SIGN_AS_POSTFIX | Constant | Output: +/- Sign Right | 01 | LIKE OUTPUTSTYLE | Public |
SIMPLE | Constant | Output: Simple | 00 | LIKE OUTPUTSTYLE | Public |
Links to Related Class(s)
CL_ABAP_...Full list of available SAP object classes
Search for further information about these or an SAP related objects