SAP ABAP Class CL_ABAP_MATH (ABAP Mathematics Library)
Hierarchy
SAP_BASIS (Software Component) SAP Basis Component
   BC-ABA-LA (Application Component) Syntax, Compiler, Runtime
     SABP_CORE (Package) Kernel-Level Objects
Properties
Class CL_ABAP_MATH  
Short Description ABAP Mathematics Library    
Super Class    
Instantiability of a Class 0  Private 
Final    
General Data
Message Class    
Program status S  System Program 
Category 0   
Package SABP_CORE   Kernel-Level Objects 
Created 20000114   SAP 
Last change 20110908   SAP 
Shared Memory-enabled    
Fixed point arithmetic    
Unicode checks active    
Forward declarations
# Type group / Object type Type Type Description
1 ABAP Type group use (TYPE-POOLS tp)  Type group use (TYPE-POOLS tp)
Interfaces
Class CL_ABAP_MATH has no interface implemented.
Friends
Class CL_ABAP_MATH has no friend class.
Attributes
# Attribute Level Visibility Read only Typing Associated Type Initial Value Description Created on
1 ENGINEERING Constant Public Type reference (TYPE) OUTPUTSTYLE 06 Output: Technical 20060202
2 MAX_DECFLOAT16 Constant Public Type reference (TYPE) DECFLOAT16 '9.999999999999999E+384' Maximum Possible Value 20060215
3 MAX_DECFLOAT34 Constant Public Type reference (TYPE) DECFLOAT34 '9.999999999999999999999999999999999E+6144' Maximum Possible Value 20060215
4 MAX_INT4 Constant Public Type reference (TYPE) I 2147483647 Biggest Possible Value for Type 1 20060803
5 MIN_DECFLOAT16 Constant Public Type reference (TYPE) DECFLOAT16 '1E-383' Smallest Positive (not Subnormal) Value 20060606
6 MIN_DECFLOAT34 Constant Public Type reference (TYPE) DECFLOAT34 '1E-6143' Smallest Positive (not Subnormal) Value 20060606
7 MIN_INT4 Constant Public Type reference (TYPE) I -2147483648 Smallest Possible Value for Type 1 20060803
8 ROUND_CEILING Constant Public Type reference (TYPE) I 0 Round to Positive Infinity 20051212
9 ROUND_DOWN Constant Public Type reference (TYPE) I 5 Round to Zero 20051212
10 ROUND_FLOOR Constant Public Type reference (TYPE) I 6 Round to Negative Infinity 20051212
11 ROUND_HALF_DOWN Constant Public Type reference (TYPE) I 4 Round to zero if value is exactly half 20051212
12 ROUND_HALF_EVEN Constant Public Type reference (TYPE) I 3 Round so last digit is an even no. if value is exactly half 20051212
13 ROUND_HALF_UP Constant Public Type reference (TYPE) I 2 Round away from zero if value is exactly half 20051212
14 ROUND_UP Constant Public Type reference (TYPE) I 1 Round away from zero 20051212
15 SCALE_PRESERVING Constant Public Type reference (TYPE) OUTPUTSTYLE 02 Output: Scale Preserving 20060127
16 SCALE_PRESERVING_SCIENTIFIC Constant Public Type reference (TYPE) OUTPUTSTYLE 05 Output: Scale Preserving Scientific 20060202
17 SCIENTIFIC Constant Public Type reference (TYPE) OUTPUTSTYLE 03 Output: Scientific 20060202
18 SCIENTIFIC_WITH_LEADING_ZERO Constant Public Type reference (TYPE) OUTPUTSTYLE 04 Output: Scientific with Leading Zero 20060202
19 SIGN_AS_POSTFIX Constant Public Type reference (TYPE) OUTPUTSTYLE 01 Output: +/- Sign Right 20060127
20 SIMPLE Constant Public Type reference (TYPE) OUTPUTSTYLE 00 Output: Simple 20060127
Methods
# Method Level Visibility Method type Description Created on
1 GET_DB_LENGTH_DECS Static method Public Method DF16_DEC/DF34_DEC: Length and Decimal Places in DB 20080125
2 GET_EXPONENT Static method Public Method Exponent of DECFLOAT Number or floor( log10( x ) ) 20110504
3 GET_MAX_DB_VALUE Static method Public Method Maximum Possible Value In Database 20080114
4 GET_NUMBER_OF_DIGITS Static method Public Method Number of Significant Places in a DECFLOAT Number 20060321
5 GET_SCALE Static method Public Method Returns Scale of a DECFLOAT Number 20060321
6 GET_SCALE_NORMALIZED Static method Public Method Number of Significant Places Without Following Zeros 20060608
7 NORMALIZE Static method Public Method Normalization of a DECFLOAT Number 20060321
8 ROUND_F_TO_15_DECS Static method Public Method Variable of ABAP Type F Rounded to 15 Decimal Places 20000114
Events
Class CL_ABAP_MATH has no event.
Types
Class CL_ABAP_MATH has no local type.
Method Signatures

Method GET_DB_LENGTH_DECS Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting DECIMALS Call by reference Type reference (TYPE) I Nachkommastellen auf der Datenbank 20080125
2 Importing IN Call by reference Type reference (TYPE) DECFLOAT Input-Variable 20080125
3 Exporting LENGTH Call by reference Type reference (TYPE) I Länge auf der Datenbank 20080125
# Exception Resumable Description Created on
1 CX_PARAMETER_INVALID_TYPE Input-Variable nicht vom Typ DF34_DEC oder DF16_DEC 20080125

Method GET_EXPONENT Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Returning EXPONENT Value transfer Type reference (TYPE) I Exponent 20110504
2 Importing VAL Call by reference Type reference (TYPE) DECFLOAT Zahl deren Exponent ermittelt wird 20110504

Method GET_EXPONENT on class CL_ABAP_MATH has no exception.

Method GET_MAX_DB_VALUE Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IN Call by reference Type reference (TYPE) DECFLOAT Input-Variable 20080114
2 Returning MAX_VALUE Value transfer Type reference (TYPE) DECFLOAT34 Maximalwert auf der Datenbank 20080114

Method GET_MAX_DB_VALUE on class CL_ABAP_MATH has no exception.

Method GET_NUMBER_OF_DIGITS Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Returning NUM_OF_DIGITS Value transfer Type reference (TYPE) I Zahl der signifikanten Stellen 20060322
2 Importing VAL Call by reference Type reference (TYPE) DECFLOAT Zu analysierende Zahl 20060322

Method GET_NUMBER_OF_DIGITS on class CL_ABAP_MATH has no exception.

Method GET_SCALE Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Returning SCALE Value transfer Type reference (TYPE) I Scale 20060322
2 Importing VAL Call by reference Type reference (TYPE) DECFLOAT Zahl deren scale ermittelt wird 20060322

Method GET_SCALE on class CL_ABAP_MATH has no exception.

Method GET_SCALE_NORMALIZED Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Returning SCALE Value transfer Type reference (TYPE) I Scale 20060608
2 Importing VAL Call by reference Type reference (TYPE) DECFLOAT Zahl deren Scale ermittelt wird 20060608

Method GET_SCALE_NORMALIZED on class CL_ABAP_MATH has no exception.

Method NORMALIZE Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Returning NORM_VAL Value transfer Type reference (TYPE) DECFLOAT34 Normalisierte DECFLOAT Zahl 20060322
2 Importing VAL Call by reference Type reference (TYPE) DECFLOAT Zu normalisierende DECFLOAT Zahl 20060322

Method NORMALIZE on class CL_ABAP_MATH has no exception.

Method ROUND_F_TO_15_DECS Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing F_IN Value transfer Type reference (TYPE) F Zu rundender Wert 20000114
2 Returning F_OUT Value transfer Type reference (TYPE) F Auf 15 Dezimalstellen gerundeter Wert 20000114

Method ROUND_F_TO_15_DECS on class CL_ABAP_MATH has no exception.
History
Last changed by/on SAP  20110908 
SAP Release Created in 50A