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 locale.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Identifier to access the Converter BO from the BOManager
  • Method Summary

    Modifier and Type
    Method
    Description
    Converts the unit ID (example PC for en_US) into the unit key (example ST )
    Converts the unit key (example ST ) into the language dependent ID (example PC for 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).
     
    int
    Retrieves the number of decimal places for units according to ERP/CRM customizing.
  • Field Details

  • Method Details

    • convertUnitKey2UnitID

      String convertUnitKey2UnitID(String unitKey) throws BusinessObjectException
      Converts the unit key (example ST ) into the language dependent ID (example PC for en_US)
      Parameters:
      unitKey - language independent unit key
      Returns:
      language dependent unit ID
      Throws:
      BusinessObjectException
    • convertUnitID2UnitKey

      String convertUnitID2UnitKey(String unitID) throws BusinessObjectException
      Converts the unit ID (example PC for en_US) into the unit key (example ST )
      Parameters:
      unitID - language dependent unit ID
      Returns:
      unit key
      Throws:
      BusinessObjectException
    • getCurrencyScale

      Integer getCurrencyScale(String sapCurrencyCode) throws BusinessObjectException
      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

      int getUnitScale(String unitKey) throws BusinessObjectException
      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

      BigDecimal getMinimumScaleValue(String unitKey) throws BusinessObjectException
      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