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 | Type group use (TYPE-POOLS tp) | Type group use (TYPE-POOLS tp) | |
| 2 | 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 | Constant | Private | Type reference (TYPE) | C | '.' | ABAP Decimals Separator | 20130909 | ||
| 2 | Constant | Private | Type reference (TYPE) | I | 3 | Default number of decimals | 20130909 | ||
| 3 | Static Attribute | Private | Type reference (TYPE) | TH_MSEHI_BUFFER | 20121214 | ||||
| 4 | Static Attribute | Private | Type reference (TYPE) | TH_UNIT_EXIST | 20100108 |
Methods
| # | Method | Level | Visibility | Method type | Description | Created on |
|---|---|---|---|---|---|---|
| 1 | Static method | Public | Method | BRS Compare two quantities | 20060224 | |
| 2 | Static method | Public | Method | Convert quantity to internal format | 20101208 | |
| 3 | Static method | Public | Method | BRS Convert quantity to external (text) format | 20090617 | |
| 4 | Static method | Private | Method | BRS Convert ISO unit to SAP unit | 20080220 | |
| 5 | Static method | Public | Method | BRS Convert quantity into another unit | 20060224 | |
| 6 | Static method | Public | Method | BRS Convert a string to a quantity | 20130813 | |
| 7 | Static method | Public | Method | Return list of available quantities | 20090303 | |
| 8 | Static method | Private | Method | BRS Returns abap_true if the unit is an ISO unit code | 20091123 | |
| 9 | Static method | Public | Method | BRS Concat number and unit, no user specific conversion | 20120814 | |
| 10 | 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 | EV_RESULT | Call by reference | Type reference (TYPE) | ABAP_BOOL | 20060307 | ||||
| 2 | IV_QUANTITY_FIRST | Call by reference | Type reference (TYPE) | IF_FDT_TYPES=>ELEMENT_NUMBER | FDT: Elementary Data Type Number | 20060307 | |||
| 3 | IV_QUANTITY_SECOND | Call by reference | Type reference (TYPE) | IF_FDT_TYPES=>ELEMENT_NUMBER | FDT: Elementary Data Type Number | 20060307 | |||
| 4 | IV_RELATIONAL_OPERATOR | Call by reference | Type reference (TYPE) | DDOPTION | Relational Operator | 20060307 | |||
| 5 | IV_UNIT_FIRST | Call by reference | Type reference (TYPE) | IF_FDT_TYPES=>ELEMENT_UNIT | FDT: Elementary Data Type Unit of Measurement | 20060307 | |||
| 6 | 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 | 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 | ES_QUANTITY_INT | Call by reference | Type reference (TYPE) | FDT_S_VALUE | Quantity in Internal Format | 20101208 | |||
| 2 | IS_QUANTITY_EXT | Call by reference | Type reference (TYPE) | FDT_S_VALUE | Quantity in External Format | 20101208 |
| # | Exception | Resumable | Description | Created on |
|---|---|---|---|---|
| 1 | 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 | ES_QUANTITY_EXT | Call by reference | Type reference (TYPE) | FDT_S_VALUE | FDT: Simple Value | 20100128 | |||
| 2 | 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 | EV_MSEHI | Call by reference | Type reference (TYPE) | MSEHI | Unit of Measurement | 20080220 | |||
| 2 | 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 | FDT: Conversion Failure | 20080220 |
Method CONVERT_QUANTITY Signature
| # | Type | Parameter | Pass Value | Optional | Typing Method | Associated Type | Default value | Description | Created on |
|---|---|---|---|---|---|---|---|---|---|
| 1 | EV_QUANTITY | Call by reference | Type reference (TYPE) | IF_FDT_TYPES=>ELEMENT_NUMBER | FDT: Elementary Data Type Number | 20060224 | |||
| 2 | IV_QUANTITY | Call by reference | Type reference (TYPE) | IF_FDT_TYPES=>ELEMENT_NUMBER | FDT: Elementary Data Type Number | 20060224 | |||
| 3 | IV_UNIT_IN | Call by reference | Type reference (TYPE) | IF_FDT_TYPES=>ELEMENT_UNIT | FDT: Elementary Data Type Unit of Measurement | 20060224 | |||
| 4 | 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 | 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 | IV_TEXT | Call by reference | Type reference (TYPE) | STRING | Quantity in string format (separated by Space) | 20130813 | |||
| 2 | RS_QUANTITY | Value transfer | Type reference (TYPE) | IF_FDT_TYPES=>ELEMENT_QUANTITY | Elementary Data Type Quantity | 20130813 |
| # | Exception | Resumable | Description | Created on |
|---|---|---|---|---|
| 1 | FDT: Invalid Input | 20130813 |
Method GET_UNIT_LIST Signature
| # | Type | Parameter | Pass Value | Optional | Typing Method | Associated Type | Default value | Description | Created on |
|---|---|---|---|---|---|---|---|---|---|
| 1 | IV_LANGU | Call by reference | Type reference (TYPE) | SYLANGU | SY-LANGU | Language Key of Current Text Environment | 20090303 | ||
| 2 | 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 | IV_UNIT | Call by reference | Type reference (TYPE) | IF_FDT_TYPES=>ELEMENT_UNIT | FDT: Elementary Data Type Unit of Measurement | 20091123 | |||
| 2 | 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 | IS_QUANTITY | Call by reference | Type reference (TYPE) | IF_FDT_TYPES=>ELEMENT_QUANTITY | Elementary Data Type Quantity | 20120814 | |||
| 2 | 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 | IV_UNIT | Call by reference | Type reference (TYPE) | IF_FDT_TYPES=>ELEMENT_UNIT | FDT: Elementary Data Type Unit of Measurement | 20060331 | |||
| 2 | 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 |