SAP HANA provided currency conversion tools as it is very often that user might to convert the currencies in report. Considering transactions might be made using different currency and currency conversion is needed to consolidate report from different region or to use global reporting currency in corporate reporting.
We can achieve this by creating a measure attribute with semantic type Amount with Currency in calculation view.
This can be done in graphical interface as well as script based views.
Graphical interface for currency conversion is preferable method to use because script based calculation views is using CONVERT_CURRENCY from SQL Script function, which is based on deprecated Column Engine Plan Operators / CE function.
There are 4 steps to create and enable currency conversion in graphical calculation view :
1) Create a measure with semantic type Amount with Currency
2) Tick to enable for conversion
3) Define Target currency (fixed / refer to another column / input by user)
Define Source currency fixed / refer to another column )
For input by user, define a input parameter with VARCHAR length 5 and assign as target currency.
4) Define conversion date (fixed / refer to another column / input by user)
Due to fluctuation of currency rate, date is important to be taking into consideration while performing currency conversion. Date can be defined by referring to another column ; or to be input by user.
One important thing to check is we must make sure TCUR schema is available and replicated for currency conversion use. The purposes of these TCUR* table is to define currency, rate type, rate. TCURX will be used for decimal shift places purposes.
Upon any currency conversion error , we can default the value to failed / NULL / ignore.
We can achieve this by creating a measure attribute with semantic type Amount with Currency in calculation view.
This can be done in graphical interface as well as script based views.
Graphical interface for currency conversion is preferable method to use because script based calculation views is using CONVERT_CURRENCY from SQL Script function, which is based on deprecated Column Engine Plan Operators / CE function.
There are 4 steps to create and enable currency conversion in graphical calculation view :
1) Create a measure with semantic type Amount with Currency
2) Tick to enable for conversion
3) Define Target currency (fixed / refer to another column / input by user)
Define Source currency fixed / refer to another column )
For input by user, define a input parameter with VARCHAR length 5 and assign as target currency.
4) Define conversion date (fixed / refer to another column / input by user)
Due to fluctuation of currency rate, date is important to be taking into consideration while performing currency conversion. Date can be defined by referring to another column ; or to be input by user.
One important thing to check is we must make sure TCUR schema is available and replicated for currency conversion use. The purposes of these TCUR* table is to define currency, rate type, rate. TCURX will be used for decimal shift places purposes.
Upon any currency conversion error , we can default the value to failed / NULL / ignore.
No comments:
Post a Comment