Model Currency Translation and Unit Conversion

Objective

After completing this lesson, you will be able to model Currency Translation and Unit Conversion

Introduction of Currency Translation and Unit Conversion

Using Currency Translation and Unit Conversion in Queries and Transformations

Using Currency Translation and Unit Conversion.

In SAP BW/4HANA, currency translation and unit conversion can be done in the following locations:

  • When a Query is executed.

  • In a Transformation.

When you use currency translation or unit conversion during reporting, analysis can be done for various target currencies and units. The original transaction currency or unit is not lost.

If you use currency translation or unit conversion during a data update using a Transformation, the converted values are physically saved, thus accelerating the report processing. However, the original values are lost.

Hint

To avoid this loss of information, we recommend that you store the original values next to the converted ones in a DataStore Object (advanced).

In the Transformation, the Allow Currency and Unit Conversion checkbox must be selected.

In some scenarios, you may want to use user-defined routines instead of currency translation types and unit conversion types. For example, if you want to convert units of measure during the transformation using a routine, you can choose Routine with Unit in the transformation rule definition. In the routine editor, you get an additional return parameter UNIT and the target unit of measure is determined using the value of this parameter.

Currency Translation

For currency translation, the data source must contain a key figure (data type AMOUNT) with either a fixed or variable currency. Also, the data target must contain a corresponding key figure (data type AMOUNT) with either a fixed or variable currency specified.

Unit Conversion

Depending on the type of unit of measure, there are two different types of key figures:

  • Key figures with fixed unit of measure

    With a fixed unit of measure, the unit is fixed for the key figure. The key figure refers specifically to the unit of measure so you do not need to enter the unit in the data record again.

  • Key figures with variable unit of measure

    A variable unit of measure references a unit InfoObject.

Transformations can be performed for key figures in the following ways:

  • Every key figure in a DataStore Object (advanced) (target key figure) has a corresponding key figure in the source (source key figure). Unit conversion is not performed.

  • There is no corresponding source key figure in the source data for the target key figure in the DataStore Object (advanced). In this situation, you have the following options:

    • You can assign a source key figure of the same type to the target key figure.

      If the units of measure of both key figures are the same, no unit conversion can take place. If the units of measure are different, a conversion can take place either using a unit conversion type or by simply assigning a unit of measure.

    • If there is no corresponding source key figure of the same type, you have to fill the key figure of the target using a routine.

You must define currency translation types and unit conversion types. You define them in BW Modeling Tools, SAP BW/4HANA Cockpit, or SAP GUI transactions RSCUR (currency translation types), and RSUOM (unit conversion types).

Configuration of Currency Translation Types

Currency Translation Types

The factor for currency translation is called the exchange rate. The exchange rate depends on four parameters:

  • Source currency
  • Target currency
  • Exchange rate type
  • Time reference
TCURR Table

This relationship is stored in the TCURR table. The content of the TCURR table can be loaded from an SAP source system.

Note

To import exchange rates from SAP ECC or SAP S/4HANA manually, in the data warehousing workbench, under Administration, choose the source system tree. In the context menu of your SAP Source System, choose Transfer Exchange Rates.

To periodically import current values, schedule a job with the program RSIMPCURR with a specific variant. Similarly, exchange rates can be imported from a flat file source system using the program RSIMPCURFILE.

There are many ways to determine the target currency or time reference. A special SAP BW/4HANA object, currency translation type, defines how these parameters are derived. As an example, you can create a currency translation type with the exchange rate type M, the target currency USD, and conversion date Sales Day.

Currency Attribute.

In a currency translation type, you can also specify an InfoObject (for example, the characteristic company code) from which the source or target currency of the translation is determined. In this case, set a currency attribute in characteristic maintenance on the Extended tab that is contained as an attribute of the characteristic (company code) on the Attributes tab.

Currency Translation Concept.

The preceding figure shows how the source or target currency can be determined as a currency attribute of an InfoObject that is part of the source. For example, a French company code uses EUR while a Canadian company code uses CAD.

Depending on the business scenario, the target value must be stored or determined at query runtime. The same or different translation types can be used in different scenarios. However, not all translation types are supported in a specific location. If the currency translation is carried out at runtime, the reporting user can define the target currency or time reference by using a BW variable. Such an option cannot be used in a transformation.

Configuration of Unit Conversion Types

Conversion Options

Simple conversions can be performed between units of measure that belong to the same dimension (such as meters to kilometers, kilograms to grams).

You can also perform InfoObject-specific conversions, such as an example where two palettes (PAL) of material 4711 were ordered and this order quantity must be converted to the stock quantity carton (CAR).

The way that you want conversion factors to be determined, is the decisive element in defining a conversion type.

Transfer all the tables relevant for unit conversion from other SAP systems connected to the SAP BW/4HANA system. Specifically, this includes the tables T006, T006A, T006B, T006C, T006D, T006I, T006J, and T006T.

Note

In the Data Warehousing Workbench, under Modeling, choose the source system tree. In the context menu of your SAP Source System, choose Transfer Global Settings. The Transfer Global Settings: Selection screen appears. Under Transfer Global Table Contents, select the Units of Measure field.

Determination of Unit Conversion Factors. Three options are available.

The specific options for dynamic determination of conversion factors are as follows:

  • Use reference InfoObject.

  • Use central units of measure (T006).

  • Use the reference InfoObject if available. Otherwise, use central units of measure (T006).

  • Use central units of measure (T006) if available. Otherwise, use reference InfoObject.

Dynamic determination of conversion factors allows for the determination to come from either a reference InfoObject (and the linked quantity DataStore Object (advanced)), from table T006, or both. If both, the order of operations is set and if the system fails to find it in the initial source, it searches the alternate source for final determination.

The following options are available for conversion factors:

  1. Using a reference InfoObject

    The system tries to determine the conversion factors from the reference InfoObject that you chose or from the associated quantity DataStore Object (advanced). Consider this scenario: you want to convert 1000 grams to kilograms but the conversion factors aren't defined in the quantity DataStore Object (advanced). In this case, the system can't perform the conversion (even though it's a simple conversion).

  2. Using central units of measure

    Conversion can only take place if the source unit of measure and target unit of measure belong to the same dimension. For example, meters to kilometers or kilograms to grams.

  3. Using reference InfoObject if available, central units of measure if not

    The system tries to determine the conversion factors using the quantity DataStore Object (advanced) you have defined. If the system finds conversion factors, it uses these to perform the calculation. If the system cannot determine conversion factors from the quantity DataStore Object (advanced), it tries again, using the central units of measure.

  4. Using central units of measure if available, reference InfoObject if not

    The system tries to find the conversion factors in the central units of the measure table. If the system finds conversion factors, it uses these conversion factors to perform the conversion. The system may not be able to determine conversion factors from the central units of measure. If so, the system tries to find conversion factors that match the attributes of the data record by looking at the quantity DataStore Object (advanced).

The settings that you can make in the system affect performance and the decision must be strictly based on the data set. Consider the following points:

  • If you are performing conversions only within the same dimension, the second option is most suitable.

  • If you are performing InfoObject-specific conversions (for example, material-specific conversions) between units that do not belong to the same dimension, the first option is most suitable.

    Note

    In both cases above, the system accesses only one database table. That table contains the conversion factors.

  • With the third and fourth options, the system tries to determine conversion factors at each stage. If conversion factors are not found in the basic table (T006), the system searches again in the quantity DataStore Object (advanced), or in reverse.

  • The option you choose depends on how you want to spread the conversion. For example, the source unit of measure and target unit of measure may belong to the same dimension for 80% of the data records that you want to convert. If so, try to determine factors by using the central units of measure (the fourth option). Accept that the system must also search for the remaining 20% in the second table.

Conversion Factor from (Key Figure) InfoObject

The Conversion Factor from (Key Figure) InfoObject option (as with Exchange Rate from InfoObject in currency translation types) is only available when you load data. The key figure that you enter here must exist in the InfoProvider and the value this key figure has in the data record is taken as the conversion factor.

Source Unit of Measure

The source unit of measure is the unit of measure that you want to convert. During the data load process, the source unit of measure is determined dynamically from the data record or from a unit (quantity) attribute of an InfoObject (characteristic).

You can also specify a fixed source unit of measure or determine the source unit of measure using a variable.

When converting quantities in a Query, the data record determines the source unit of measure.

Target Unit of Measure

You have the following options for determining the target unit of measure:

  • You can enter a fixed target unit of measure in the unit conversion type (for example, kg).

  • You can specify an InfoObject in the unit conversion type that is used to determine the target unit of measure during the conversion. All InfoObjects that have at least one unit attribute type are listed under InfoObject for Determining Unit of Measure. Select one of these attributes as the corresponding quantity attribute.

  • Alternatively, you can specify that the target unit of measure is determined from a variable during the conversion.

Create Currency Translation Types and Quantity Conversion Types

To learn how to create a currency translation type, watch this video.

To learn how to create another currency translation type, watch this video.

To learn how to create a unit conversion type, watch this video.

Load Data in a DataStore Object (Advanced) Using Currency Translation and Unit Conversion

To learn how to use the currency translation type and unit conversion type in the Transformation of the InfoSource and load the data into a DataStore Object (advanced) using this Transformation, watch this video.

Log in to track your progress & complete quizzes