cancel
Showing results for 
Search instead for 
Did you mean: 

Currency tables: Using your own SCHEMA

Former Member
0 Kudos

I would like to use currency tables in my own schema creating them in a project.

HANA revision v 56 (Amazon developer edition)

Steps I've done so far:

1. Created a project.

2. Created the hdbschema, hdbtables, hdbtim, hdbtid, hdbrole objects - using the SAP_HANA_EPM_DEMO as the guide. Activate and import data into the tables. Assign the roles to the SYSTEM user.

3. Create a calculation view with a measure (type: amount with currency)

     In the properties of the calc view, the currency schema is set to my schema (CURRENCY). The system only shows CURRENCY and SAP_HANA_EPM_DEMO as valid choices to select the schema. The client is set to 001 as loaded in the files.

The problem.

When I try to use the currency translation in the measure by following these steps

      Select - Enable for conversion.

     Click the target currency selector.

     Choose "Fixed".

     I get the error

System tables for currency conversion is missing in the default schema.

This doesn't happen with the SAP_HANA_EPM_DEMO schema - even though the tables and permissions are identical.

As anyone successfully created currency tables prefixed with a package name in any other schema?

Further notes:

I was able to get it working by recreating the tables without the package prefix i.e.

CREATE TABLE "CURRENCY".TCURC as (SELECT * from "CURRENCY"."CurrencySet.data::TCURC");

CREATE TABLE "CURRENCY".TCURF as (SELECT * from "CURRENCY"."CurrencySet.data::TCURF");

CREATE TABLE "CURRENCY".TCURN as (SELECT * from "CURRENCY"."CurrencySet.data::TCURN");

CREATE TABLE "CURRENCY".TCURR as (SELECT * from "CURRENCY"."CurrencySet.data::TCURR");

CREATE TABLE "CURRENCY".TCURT as (SELECT * from "CURRENCY"."CurrencySet.data::TCURT");

CREATE TABLE "CURRENCY".TCURW as (SELECT * from "CURRENCY"."CurrencySet.data::TCURW");

CREATE TABLE "CURRENCY".TCURX as (SELECT * from "CURRENCY"."CurrencySet.data::TCURX");

So it works when the currency tables do not have a package prefix.

Any insight appreciated!

Accepted Solutions (1)

Accepted Solutions (1)

former_member184768
Active Contributor
0 Kudos

Hi Divya,

The package prefix for the tables is relatively new concept, mostly used for the Native HANA development applications.

Currency conversion feature has been there for quite some time and I don't think it might have been integrated with the package naming convention feature yet. It goes mostly on the BW functionality, that's why you see the CLIENT option which is more relevant to SAP standard development norms.

Regards,

Ravi

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

You have to create Synonyms for all the currency conversion tables which remove the package prefix.  As suggested the currency conversion can't deal with the package prefix on the front of the table names.  Have a look at the Synonyms in the SAP_HANA_EPM_DEMO Schema.  That is exactly what you will need for your schema as well.

former_member182500
Contributor
0 Kudos

Thanks Thomas, the synonyms for the TCUR* tables in my schema were the missing piece.  2 additional steps following the steps I listed in earlier post below got the analytic view with currency conversion working:

  • Synonyms created directly via the SQL console with CREATE SYNONYM for each TCUR* table, assigned to my schema (as opposed to a public synonym).

  • Due to an error upon data preview of analytic view highlighting "session client error" - In advanced tab of calculated column for conversion, change client from "dynamic" to 800, which I imagine is the default client for Hana?

FYI I do not see any schema specific synonyms for the TCUR* tables in schema SAP_HANA_EPM_DEMO in my AWS Hana Developer SPS6 system.

Thanks again for your help.

Former Member
0 Kudos

Thanks Thomas.

For those trying to fix this issue - the fix was to run the following SQL to create the synonyms.

SET SCHEMA CURRENCY;

CREATE SYNONYM TCURC for "CurrencySet.data::TCURC";

CREATE SYNONYM TCURF for "CurrencySet.data::TCURF";

CREATE SYNONYM TCURN for "CurrencySet.data::TCURN";

CREATE SYNONYM TCURR for "CurrencySet.data::TCURR";

CREATE SYNONYM TCURT for "CurrencySet.data::TCURT";

CREATE SYNONYM TCURV for "CurrencySet.data::TCURV";

CREATE SYNONYM TCURW for "CurrencySet.data::TCURW";

CREATE SYNONYM TCURX for "CurrencySet.data::TCURX";

Former Member
0 Kudos

Hi Thomas,

I also have an issue with currency conversion, im trying to create dynamic currency conversion using the sflight demo data.  For some reason the schema for currency conversion is EPM Demo schema, please help:

Thanks in advance

former_member182500
Contributor
0 Kudos

It's hard to read your image but I suspect it says conversion failed - which it would if in the semantic tab of your calculated column with conversion you set "Upon Conversion Failure" to "Fail" (because you don't have currency conversion data for currencies and dates selected). 

Try setting to "ignore".

Former Member
0 Kudos

Thx Jon-Paul,

That solved my problem, just wondering if i had to update the exchange rates where would i do it, in which of these tables is it kept?

former_member182500
Contributor
0 Kudos

Currency conversion data held in T006/TCUR* tables, these originate from ECC system and normally populated there and ETL'd into Hana.  It would not be easy to manually update contents from within Hana, 

Now if there was an currency generator utility in Hana.....

Former Member
0 Kudos

Ya, that would be cool!

Thanks a mil

Former Member
0 Kudos

I'm having trouble creating the synonym using the instructions above.  I'm working on a HANA Live installation and am having the same error described above.  I don't have a schema named Currency in my instance, so the script above gives an error.  Has anyone solved this problem in a HANA Live installation yet?  If so, could you offer some pro tips on where the currency information is found in a HANA Live installation?

Thanks,

Rob

Nevermind, I figured it out!

Answers (1)

Answers (1)

former_member182500
Contributor
0 Kudos

I too am having issues with creating a calculated column with currency conversion in an analytic view - I get the error "System tables for currency conversion is missing in the default schema.".

On AWS Developer edition SPS6 I have:

  • recreated the TCUR tables

  • populated with data from the CSV files within the EPM demo

  • triple checked the client was properly created as a 3 character string (i.e 000 and 001 than 0 and 1)

  • granted access to role with schema and TCUR* tables to my SYSTEM user I log into Studio with.

  • Selected my schema both in the default properties of the view and in the advanced tab when creating the calculated column.

Client defaults as dynamic both at view property and calculated column levels, note I have data in TCUR tables for clients 000 and 001 (as per EPM demo table content). 

Also note that in Studio within Window > Preferences > Modeler > Default Model Parameters the default client is set at dynamic and this is the only option.  I do not know for AWS Hana Developer what the client may be (in order to client in TCUR tables matches).

Interesting enough if I try to maintain the EPM DEMO model analytic view that does currency conversion, AN_PURCHASE_COMMON_CURRENCY, when maintaining the currency conversion calculated column the error "System tables....." is given here too, and the client in advanced tab is set to 100???

Many thanks for any extra input.

Former Member
0 Kudos

Hi Jon-Paul,

Run the SYNONYMS script but change it to read

CREATE SYNONYM TCURC for "sap.hana.demo.epm.data::TCURC";

(Note - please check the namespace. I'm typing this from a laptop that doesn't have a HANA connection).

balwant108
Explorer
0 Kudos

Please can some body guide ,how were the SQL statements for Synonym/Synonym tables were imported to the next system using change ID?