This function group contains the following function modules:
·
CONVERSION_FACTOR_GET
With this
function module, you determine the conversion factors for the conversion of a
measurement unit into another using the measurement units table. This does not
apply to measurement units within a dimension.
The module also returns the number of decimal places to which the values in
the unit UNIT_OUT are to be rounded. This also applies to units with no
dimension.
The following formula applies for the conversion:
(value in the unit UNIT_OUT) = (value in the unit UNIT_IN) * numerator/denominator + additive constant.
·
ROUND
With this
function module, you round a value to the specified number of decimal places.
You can choose between three rounding types:
- Rounding up
- Rounding down
- Commercial rounding
The rounding is performed internally with the same
field type as that of the field passed.
Rounding errors can thus occur when rounding a FLOAT value. If you want a high
degree of accuracy, the passed field should have the type P.
·
SI_UNIT_GET
You pass either
a unit or a dimension to this function module to get the SI unit. If you pass
both a unit and a dimension, the SI unit for the dimension is
returned.
·
UNIT_CONVERSION_WITH_FACTOR
With this
function module, you convert a value according to the factor passed.
·
UNIT_CORRESPONDENCE_CHECK
With this
function module, you can check whether the two units passed belong to the same
dimension.
·
UNIT_GET
With this
function module, you get the appropriate measurement unit for the specified
dimension and conversion factor.
·
UNIT_CONVERSION_SIMPLE
With this
function module, you convert a value using the measurement unit table, and
round it, if appropriate.
You can also perform the rounding without conversion.
Conversion with this function module requires that the measurement unit table
is maintained for both units, and that both units belong to the same
dimension, i.e. also that they have dimensions.
The rounding can, however, also be performed for units which have no
dimension.