Updating the Global Currency Rates
Many Data Models belonging to the standard NectariTemplate return amounts that have been converted to the global currency of the company. This conversion is done by using a rate stored in a custom table (ZTABCHANGE), which is created automatically when running the Global Scripts during the Template Import.
This table needs to be populated with currency conversion rates on a regular basis.
Setting up an automatic job in the SQL Server agent is recommended.
Setup on a SQL Server
The script needed for this job to run can be obtained by going into the X3 Database in SQL Server Management Studio and executing the ZREFCNVRATES stored procedure, found under the Programmability, Stored Procedures section of the X3 database, and under each custom schema created during the Template Import.
Below is an example of the resulting script which was run in an X3 database, in a custom NEC_SEED schema.
You can use this script, provided that you replace NEC_SEED by the appropriate custom schema name for your installation.
You should have one SQL Server Agent Jobfor each custom schema you created during the Template Import process (making sure that each job executes a script which contains the proper respective custom schema name in the call of the ZREFCNVRATES stored procedure).
USE [x3]
GO
EXEC [NEC_SEED].[ZREFCNVRATES] 'USD'
Where NEC_SEED is the custom schema for Nectari, x3 is the ERP database, and USD is your global currency.
Setup on an Oracle Server
You can create a new Oracle job which runs a script similar to the following.
Below is an example of a script which is meant to be run in the X3 Database, in a custom NEC_SEED schema and launches the ZREFCNVRATES procedure.
You can use this script, provided that you replace NEC_SEED by the appropriate custom schema name for your installation.
You should have one job for each custom schema you created during the Template Import procedure.
BEGIN
NEC_SEED.ZREFCNVRATES('USD');
END;
Where NEC_SEED is the custom schema for Nectari and USD is your global currency.
Updating the Global Currency rates manually
You can also update the currency conversion rates manually from Nectari.
- From the Data Models and Views tab, right-click on the Global Currency Rates (Consolidation)Data Model and select View Info
Pages.
- Depending on the Central Point database type (SQL Server or Oracle), click on Update internal currency exchange rates.
Create an SQL Job to update the Global Currency rates
Scheduling a job to refresh the Global Currency rates on a regular basis is recommended.
- The frequency should be agreed upon with the client. A good example would be to let the job run on a daily basis, after office hours.
- Below are examples for SQL and Oracle. Repeat this step for each defined Environment.
SQL:
On an SQL server, create an SQL Job with SQL Server Agent.
Below is a script you can use as reference in the SQL Job definition. You will need to replace X3v6 with the name of your Sage X3 ERP database, and NEC_SEED by the name of the NectariCustom Schema specified in the X3 data source.
USE [x3]
GO
EXEC [NEC_SEED].[ZREFCNVRATES] 'USD'
ORACLE:
An example of the Oracle command for rebuilding the currency rate table is specified below.
You will need to replace CUSTOM_SCHEMA by the name of the Nectari Custom Schema (in Oracle also known as a User) specified in the X3 data source.
BEGIN
CUSTOM_SCHEMA.ZREFCNVRATES ('USD');
END;