Currency Translation

Monetary values that are stored in the data model are either displayed in their original currency or translated into a reporting or target currency. This translation can be on an aggregated or an item level. Translated values are needed in SQL views or other SQL constructs as well as in graphical HANA calculation views. In SAP Financial Services Data Management, we recommend that you use the built-in SAP HANA currency function (CONVERT_CURRENCY). Please note that the terms currency translation and currency conversion are used as synonyms.

The SAP HANA currency conversion translates an amount in a base currency into an amount in a target currency for a special key date by applying the exchange rates valid on that date. The HANA currency conversion expects the input with the same column names as in the ABAP tables. However, it is not restricted to the data types used in the original ABAP tables. This has the following advantages:

  • You can use SQL dates instead of DATS style dates.

  • You are not restricted by the comparatively short data types used for the foreign exchange (FX) rate in the ABAP tables. Instead, you can map the more precise rates in the SAP Financial Services Data Management tables to the format used in the ABAP tables.

The documentation for function CONVERT_CURRENCY describes how you can set parameters such as the rounding behavior or error handling when you call the HANA currency conversion. See also Associate Measures with Currency.

The HANA currency conversion provides two different methods:
  1. The ERP method, which stores the cross rates in table TCURR with 9 digits.
  2. The Banking method, which stores the rates in table /BA1/F4_FXRATES with 15 digits.

As part of the template, SAP Financial Services Data Management provides content for the currency translation. For more information about the template, see Installing or Upgrading the Template to Use or Extend the Data Model.

Make sure that the checkbox Include an Example of a Currency Translation is marked.

In the template, you can find the example in the FXConversion folder as shown in the following figure:

The example provided with the template is based on the Banking method of the HANA currency conversion and consists of the following:

  • Content views that you can use in the HANA currency conversion.

    • ba1_f4_fxrates.hdbview:

      This view translates the entries of entity EndOfDayExchangeRateObservation so they can be used in the HANA currency translation.

    • ba1_f4_fxrttyp.hdbview:

      This view contains configuration information. You have to adapt the content of this view.

    • map_pricedataprovider_to_mdcode.hdbview:

      This view suggests a translation of the field PriceDataProvider to MDCODE (master data area).

    • ba1_tf4_fxcvfct.hdbview:

      This view is needed to call the currency translation. In many cases, you do not need to adapt this view.

    • tcurn.hdbview:

      This view is needed to use the currency translation in a calculation view. In most cases, you do not need to adapt this view.

    • tcurx.hdbview:

      This view is needed to call the currency translation. In most cases, you do not need to adapt this view.

    For more information, see the comments that are embedded in the content views.

  • Example views that show how you can use the currency translation on data. You can use these views as a template:

    • MinimalBankingConversion.hdbview:

      This is a synthetic example that shows how you can use the function CONVERT_CURRENCY.

    • BankingConversionAllOptions.hdbview:

      This is a synthetic example that shows all the options for the function CONVERT_CURRENCY.

    • IncomeInformationPerPropertyView.hdbview:

      This view shows a conversion on top of an FDSM table as an example. We recommend that you use the read interface on top of the table.

    • IncomeInformationPerProperty.hdbcalculationview:

      This calculation view shows how you can use the currency translation. Use the preview functionality to look at the converted data (in EUR) after you have loaded the example data.

    For more information, see the comments that are embedded in the example views.

  • Example data that you can use to explore the example views. During a build, the data is automatically loaded into the contained staging tables. For more information about how to load this data from the staging area into the data model, see the README. This data is not intended to be used in a productive system.

    • CurrencyCode

    • EndOfDayExchangeRateObervation

    The content in the README shows you how you can combine the currency conversion tables as part of the data model with content views that are adapted for the Banking method, as well as examples for calculation views and SQL views. As shown in the following figure, you can decide whether to use the calculation and SQL views as they are or as a template.

More Information

For more information, see the related entities and their definitions in the data model represented in SAP PowerDesigner.