Class ConverterImpl

    • Constructor Detail

      • ConverterImpl

        public ConverterImpl()
    • Method Detail

      • convertUnitKey2UnitID

        public java.lang.String convertUnitKey2UnitID​(java.lang.String unitKey)
                                               throws BusinessObjectException
        Description copied from interface: Converter
        Converts the unit key (example ST ) into the language dependent ID (example PC for en_US)
        Specified by:
        convertUnitKey2UnitID in interface Converter
        Parameters:
        unitKey - language independent unit key
        Returns:
        language dependent unit ID
        Throws:
        BusinessObjectException
      • getCurrencyScale

        public java.lang.Integer getCurrencyScale​(java.lang.String sapCurrencyCode)
                                           throws BusinessObjectException
        Description copied from interface: Converter
        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.
        Specified by:
        getCurrencyScale in interface Converter
        Parameters:
        sapCurrencyCode - currency code. Must be available in customizing tabke TCURC
        Returns:
        number of decimal places
        Throws:
        BusinessObjectException
      • getUnitScale

        public int getUnitScale​(java.lang.String unitKey)
                         throws BusinessObjectException
        Description copied from interface: Converter
        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.
        Specified by:
        getUnitScale in interface Converter
        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

        public java.math.BigDecimal getMinimumScaleValue​(java.lang.String unitKey)
                                                  throws BusinessObjectException
        Specified by:
        getMinimumScaleValue in interface Converter
        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
      • getMinimumScaleValue

        protected java.math.BigDecimal getMinimumScaleValue​(int scale)