Skip to content
This repository has been archived by the owner on Feb 2, 2024. It is now read-only.

Latest commit

 

History

History

currency-wrapper-view

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Wrap Currency (TCUR*) Tables as Views

In the exercise you will wrap the Currency Tables as Views, which can be used in the Currency Conversion function in the modeling as the following:

CONVERT_CURRENCY(
  "AMOUNT" => "NETAMOUNT", 
  "SOURCE_UNIT" => "CURRENCY", 
  "TARGET_UNIT" => 'EUR', 
  "CONVERSION_TYPE" => 'M', 
  "REFERENCE_DATE" => CURRENT_DATE, 
  "CLIENT" => '002', "SCHEMA" => 'ZST_WORKSHOP', 
  "ERROR_HANDLING" => 'set_to_null', 
  "STEPS" => 'shift,convert,round', 
  "PRECISIONS_TABLE" => 'V_TCURX', 
  "CONFIGURATION_TABLE" => 'V_TCURV', 
  "PREFACTORS_TABLE" => 'V_TCURF', 
  "RATES_TABLE" => 'V_TCURR'
  "NOTATION_TABLE" => 'V_TCURN')

CONVERT_CURRENCY() Function: More information about the SAP HANA Function and the configuration of the parameters can be found under the Help site.

🚩 2021-09-22: As of today, SAP Analytics Cloud must not access any table directly in SAP Data Warehouse Cloud due to security boundaries. That applies also for the currency conversion relevant tables such as TUCRR (Rates), TCURX (Precisions), TCURV (Configurations), TCURF (Prefactors), TCURN (Notation).

As an intermediate workaround you have to wrap the tables as views and declare them in the usage of the Currency Conversion function. Please note that this will change in the upcomming releases. There it is planned that Currency Conversion can be configured centrally per space.

Wrap Currency Rates (TCURR) Table as View

  1. Navigate to the Repository Explorer
  2. Click on Create - Graphical View Button to create a new view



  3. Drag and drop the table CSV_TCURR into the canvas



  4. Select the Output Node in the canvas and configure the following properties:
    • Business Name: V_TCURR
    • Technical Name: V_TCURR
    • Semantic Usage: Relational Dataset
    • Expose for Consumption: ON
  5. Click on deploy button to deploy the view

Wrap Currency Prefactors (TCURF) Table as View

  1. Navigate to the Repository Explorer
  2. Click on Create - Graphical View Button to create a new view



  3. Drag and drop the table CSV_TCURF into the canvas



  4. Select the Output Node in the canvas and configure the following properties:
    • Business Name: V_TCURF
    • Technical Name: V_TCURF
    • Semantic Usage: Relational Dataset
    • Expose for Consumption: ON
  5. Click on deploy button to deploy the view

Wrap Currency Configurations (TCURV) Table as View

  1. Navigate to the Repository Explorer
  2. Click on Create - Graphical View Button to create a new view



  3. Drag and drop the table CSV_TCURV into the canvas



  4. Select the Output Node in the canvas and configure the following properties:
    • Business Name: V_TCURV
    • Technical Name: V_TCURV
    • Semantic Usage: Relational Dataset
    • Expose for Consumption: ON
  5. Click on deploy button to deploy the view

Wrap Currency Precisions (TCURX) Table as View

  1. Navigate to the Repository Explorer
  2. Click on Create - Graphical View Button to create a new view



  3. Drag and drop the table CSV_TCURX into the canvas



  4. Select the Output Node in the canvas and configure the following properties:
    • Business Name: V_TCURX
    • Technical Name: V_TCURX
    • Semantic Usage: Relational Dataset
    • Expose for Consumption: ON
  5. Click on deploy button to deploy the view

Wrap Currency Notation (TCURN) Table as View

  1. Navigate to the Repository Explorer
  2. Click on Create - Graphical View Button to create a new view



  3. Drag and drop the table CSV_TCURN into the canvas



  4. Select the Output Node in the canvas and configure the following properties:
    • Business Name: V_TCURN
    • Technical Name: V_TCURN
    • Semantic Usage: Relational Dataset
    • Expose for Consumption: ON
  5. Click on deploy button to deploy the view