SAP ABAP Class CL_FDT_QUANTITY_CONV (FDT Service: Conversion of quantities w. units)
Hierarchy
SAP_BASIS (Software Component) SAP Basis Component
   BC-SRV-BR (Application Component) BRFplus - ABAP-Based Business Rules
     SFDT_SERVICE (Package) BRFplus: Services
Properties
Class CL_FDT_QUANTITY_CONV  
Short Description FDT Service: Conversion of quantities w. units    
Super Class    
Instantiability of a Class 2  Public 
Final    
General Data
Message Class    
Program status     
Category 0   
Package SFDT_SERVICE   BRFplus: Services 
Created 20060222   SAP 
Last change 20130531   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)
2 IF_FDT_TYPES Forward declaration interface (INTERFACE i DEFINITION DEF...  Forward declaration interface (INTERFACE i DEFINITION DEF...
Interfaces
Class CL_FDT_QUANTITY_CONV has no interface implemented.
Friends
Class CL_FDT_QUANTITY_CONV has no friend class.
Attributes
# Attribute Level Visibility Read only Typing Associated Type Initial Value Description Created on
1 GC_ABAP_DECIMALS_SEPARATOR Constant Private Type reference (TYPE) C '.' ABAP Decimals Separator 20130909
2 GC_DECIMALS_DEFAULT Constant Private Type reference (TYPE) I 3 Default number of decimals 20130909
3 GTH_MSEHI_BUFFER Static Attribute Private Type reference (TYPE) TH_MSEHI_BUFFER 20121214
4 GTH_UNIT_EXIST Static Attribute Private Type reference (TYPE) TH_UNIT_EXIST 20100108
Methods
# Method Level Visibility Method type Description Created on
1 COMPARE_QUANTITIES Static method Public Method BRS Compare two quantities 20060224
2 CONVERT_EXT_TO_INT Static method Public Method Convert quantity to internal format 20101208
3 CONVERT_INT_TO_EXT Static method Public Method BRS Convert quantity to external (text) format 20090617
4 CONVERT_ISO_TO_SAP Static method Private Method BRS Convert ISO unit to SAP unit 20080220
5 CONVERT_QUANTITY Static method Public Method BRS Convert quantity into another unit 20060224
6 CONVERT_STRING_TO_QUANTITY Static method Public Method BRS Convert a string to a quantity 20130813
7 GET_UNIT_LIST Static method Public Method Return list of available quantities 20090303
8 IS_ISO_UNIT_CODE Static method Private Method BRS Returns abap_true if the unit is an ISO unit code 20091123
9 TO_STRING Static method Public Method BRS Concat number and unit, no user specific conversion 20120814
10 UNIT_EXIST Static method Public Method BRS Returns abap_true if the unit exists 20060331
Events
Class CL_FDT_QUANTITY_CONV has no event.
Types
# Type Visibility Typing Associated Type Description Created on Type Source
1 S_MSEHI_BUFFER Private See coding 20121214 BEGIN OF s_msehi_buffer, unit TYPE if_fdt_types=>element_unit, msehi TYPE msehi, END OF s_msehi_buffer
2 S_UNIT_EXIST Private See coding 20100108 BEGIN OF s_unit_exist, unit TYPE if_fdt_types=>element_unit, exist TYPE abap_bool, END OF s_unit_exist
3 TH_MSEHI_BUFFER Private See coding 20121214 th_msehi_buffer TYPE HASHED TABLE OF s_msehi_buffer WITH UNIQUE KEY unit
4 TH_UNIT_EXIST Private See coding 20100108 th_unit_exist TYPE HASHED TABLE OF s_unit_exist WITH UNIQUE KEY unit
Method Signatures

Method COMPARE_QUANTITIES Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting EV_RESULT Call by reference Type reference (TYPE) ABAP_BOOL 20060307
2 Importing IV_QUANTITY_FIRST Call by reference Type reference (TYPE) IF_FDT_TYPES=>ELEMENT_NUMBER FDT: Elementary Data Type Number 20060307
3 Importing IV_QUANTITY_SECOND Call by reference Type reference (TYPE) IF_FDT_TYPES=>ELEMENT_NUMBER FDT: Elementary Data Type Number 20060307
4 Importing IV_RELATIONAL_OPERATOR Call by reference Type reference (TYPE) DDOPTION Relational Operator 20060307
5 Importing IV_UNIT_FIRST Call by reference Type reference (TYPE) IF_FDT_TYPES=>ELEMENT_UNIT FDT: Elementary Data Type Unit of Measurement 20060307
6 Importing IV_UNIT_SECOND Call by reference Type reference (TYPE) IF_FDT_TYPES=>ELEMENT_UNIT FDT: Elementary Data Type Unit of Measurement 20060307
# Exception Resumable Description Created on
1 CX_FDT_CONVERSION FDT: Processing Error 20060908

Method CONVERT_EXT_TO_INT Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting ES_QUANTITY_INT Call by reference Type reference (TYPE) FDT_S_VALUE Quantity in Internal Format 20101208
2 Importing IS_QUANTITY_EXT Call by reference Type reference (TYPE) FDT_S_VALUE Quantity in External Format 20101208
# Exception Resumable Description Created on
1 CX_FDT_CONVERSION FDT: Conversion Failure 20101208

Method CONVERT_INT_TO_EXT Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting ES_QUANTITY_EXT Call by reference Type reference (TYPE) FDT_S_VALUE FDT: Simple Value 20100128
2 Importing IS_QUANTITY_INT Call by reference Type reference (TYPE) FDT_S_VALUE FDT: Simple Value 20100128

Method CONVERT_INT_TO_EXT on class CL_FDT_QUANTITY_CONV has no exception.

Method CONVERT_ISO_TO_SAP Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting EV_MSEHI Call by reference Type reference (TYPE) MSEHI Unit of Measurement 20080220
2 Importing IV_UNIT Call by reference Type reference (TYPE) IF_FDT_TYPES=>ELEMENT_UNIT Elementary Data Type Unit of Measurement 20080220
# Exception Resumable Description Created on
1 CX_FDT_CONVERSION FDT: Conversion Failure 20080220

Method CONVERT_QUANTITY Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Exporting EV_QUANTITY Call by reference Type reference (TYPE) IF_FDT_TYPES=>ELEMENT_NUMBER FDT: Elementary Data Type Number 20060224
2 Importing IV_QUANTITY Call by reference Type reference (TYPE) IF_FDT_TYPES=>ELEMENT_NUMBER FDT: Elementary Data Type Number 20060224
3 Importing IV_UNIT_IN Call by reference Type reference (TYPE) IF_FDT_TYPES=>ELEMENT_UNIT FDT: Elementary Data Type Unit of Measurement 20060224
4 Importing IV_UNIT_OUT Call by reference Type reference (TYPE) IF_FDT_TYPES=>ELEMENT_UNIT FDT: Elementary Data Type Unit of Measurement 20060224
# Exception Resumable Description Created on
1 CX_FDT_CONVERSION FDT: Processing Error 20060908

Method CONVERT_STRING_TO_QUANTITY Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IV_TEXT Call by reference Type reference (TYPE) STRING Quantity in string format (separated by Space) 20130813
2 Returning RS_QUANTITY Value transfer Type reference (TYPE) IF_FDT_TYPES=>ELEMENT_QUANTITY Elementary Data Type Quantity 20130813
# Exception Resumable Description Created on
1 CX_FDT_CONVERSION FDT: Invalid Input 20130813

Method GET_UNIT_LIST Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IV_LANGU Call by reference Type reference (TYPE) SYLANGU SY-LANGU Language Key of Current Text Environment 20090303
2 Returning RT_LIST Value transfer Type reference (TYPE) FDTT_VALUE_TEXT FDT: Value with text 20090303

Method GET_UNIT_LIST on class CL_FDT_QUANTITY_CONV has no exception.

Method IS_ISO_UNIT_CODE Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IV_UNIT Call by reference Type reference (TYPE) IF_FDT_TYPES=>ELEMENT_UNIT FDT: Elementary Data Type Unit of Measurement 20091123
2 Returning RV_IS_ISO_UNIT_CODE Value transfer Type reference (TYPE) ABAP_BOOL 20091123

Method IS_ISO_UNIT_CODE on class CL_FDT_QUANTITY_CONV has no exception.

Method TO_STRING Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IS_QUANTITY Call by reference Type reference (TYPE) IF_FDT_TYPES=>ELEMENT_QUANTITY Elementary Data Type Quantity 20120814
2 Returning RV_STRING Value transfer Type reference (TYPE) IF_FDT_TYPES=>ELEMENT_TEXT Elementary Data Type Text 20120814

Method TO_STRING on class CL_FDT_QUANTITY_CONV has no exception.

Method UNIT_EXIST Signature

# Type Parameter Pass Value Optional Typing Method Associated Type Default value Description Created on
1 Importing IV_UNIT Call by reference Type reference (TYPE) IF_FDT_TYPES=>ELEMENT_UNIT FDT: Elementary Data Type Unit of Measurement 20060331
2 Returning RV_EXIST Value transfer Type reference (TYPE) ABAP_BOOL 20060407

Method UNIT_EXIST on class CL_FDT_QUANTITY_CONV has no exception.
History
Last changed by/on SAP  20130531 
SAP Release Created in 710