Interface Converter
- All Known Implementing Classes:
ConverterImpl
public interface Converter
Converter BO functionality.
Retrieves currency and unit scales and also is able to convert unit keys (language independent) into unit ID's.
The language does not need to be provided, it is taken from the session
Retrieves currency and unit scales and also is able to convert unit keys (language independent) into unit ID's.
The language does not need to be provided, it is taken from the session
locale.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionconvertUnitID2UnitKey(String unitID) Converts the unit ID (examplePCfor en_US) into the unit key (exampleST)convertUnitKey2UnitID(String unitKey) Converts the unit key (exampleST) into the language dependent ID (examplePCfor en_US)getCurrencyScale(String sapCurrencyCode) Retrieves the number of decimal places for a currency (which might be an ISO currency but doesn't need to be).getMinimumScaleValue(String unitKey) intgetUnitScale(String unitKey) Retrieves the number of decimal places for units according to ERP/CRM customizing.
-
Field Details
-
BO_TYPE
Identifier to access the Converter BO from the BOManager- See Also:
-
-
Method Details
-
convertUnitKey2UnitID
Converts the unit key (exampleST) into the language dependent ID (examplePCfor en_US)- Parameters:
unitKey- language independent unit key- Returns:
- language dependent unit ID
- Throws:
BusinessObjectException
-
convertUnitID2UnitKey
Converts the unit ID (examplePCfor en_US) into the unit key (exampleST)- Parameters:
unitID- language dependent unit ID- Returns:
- unit key
- Throws:
BusinessObjectException
-
getCurrencyScale
Retrieves the number of decimal places for a currency (which might be an ISO currency but doesn't need to be).
Basis is the ERP/CRM customizing in tables TCURX and TCURC.
Examples: USD typically has 2 decimal places, JPY has zero.- Parameters:
sapCurrencyCode- currency code. Must be available in customizing tabke TCURC- Returns:
- number of decimal places
- Throws:
BusinessObjectException
-
getUnitScale
Retrieves the number of decimal places for units according to ERP/CRM customizing. This is relevant for UI display in case the unit amount is not an integer.- Parameters:
unitKey- the language independet unit key. Must be available in customizing table T006- Returns:
- the number of decimal places for UI display
- Throws:
BusinessObjectException
-
getMinimumScaleValue
- Parameters:
unitKey- the language independet unit key. Must be available in customizing table T006- Returns:
- BigDecimal representing the smallest value given a scale
- Throws:
BusinessObjectException
-