Can we
directly update the GL_DAILY_RATES table?
No.
Directly updating any base table is not recommended and any changes in the
table should come through the daily rates interface table only -
GL_DAILY_RATES_INTERFACE.
Insert
rows into it with a FROM_CURRENCY, a TO_CURRENCY, a FROM_CONVERSION_DATE, a
TO_CONVERSION_DATE, a USER_CONVERSION_TYPE, a dummy CONVERSION_RATE, and a MODE
of ’D’.
Any
rates in GL_DAILY_RATES with a date between the FROM_CONVERSION_DATE and
TO_CONVERSION_DATE and with that FROM_CURRENCY, TO_CURRENCY, and
USER_CONVERSION_TYPE will be deleted automatically.
Note
that when inserting into this table you must specify the USER_CONVERSION_TYPE,
not the CONVERSION_TYPE.
Oracle
General Ledger will automatically convert the USER_CONVERSION_TYPE to the
CONVERSION_TYPE when it maintains GL_DAILY_RATES.
Trigger
GL_DAILY_RATES_INTERFACE_AI:
Trigger
GL_DAILY_RATES_INTERFACE_AI is defined over GL_DAILY_RATES_INTERFACE table. It
creates and deletes the data in GL_DAILY_RATES after an INSERT statement in
GL_DAILY_RATES table.
• Conversion_type
exists
• Conversion_rate is
not a negative number
• Inverse_conversion_rate
is not a negative number
• Range of Dates
specified does not exceed 366 days.
• From_Currency and
To_Currency
Trigger
inserts or deletes records in GL_DAILY_RATES depending on the value of column
Mode_Flag.
Import
mode ('D' - delete any matching rows from gl_daily_rates, 'I' - insert or
update rows in gl_daily_rates, and 'X' - invalid row)
If you
define D value, the trigger deletes the corresponding rates in GL_DAILY_RATES,
and if you define I value it inserts rates in GL_DAILY_RATES.
Whenever
the trigger does not detect an error condition, the corresponding records are
automatically deleted in GL_DAILY_RATES_INTERFACE and inserted in
GL_DAILY_RATES.
If an
error condition is found, the trigger updates the column Mode_flag with an X
value and Error_code is defined with one of the following message codes:
Message
|
Code Description
|
Nonexistant_Conversion_Type
|
Specified conversion type does not exist in table
GL_DAILY_CONVERSION_TYPES.
|
Date_Range_Too_Large
|
The number of days between to_conversion_date and
from_conversion_date is greater than 367 or one year
|
Negative_Conversion_Rate
|
Conversion rate in GL_DAILY_RATES_INTERFACE is negative
|
Negative_Inverse_Rate
|
Inverse conversion rate in GL_DAILY_RATES_INTERFACE is
negative
|
Nonexistant_From_Currency
|
Specified from currency does not exist in table FND_CURRENCIES
|
Disabled_From_Currency
|
The currency is disabled in FND_CURRENCIES
|
Statistical_From_Currency
|
Statistical currency does not need conversion rate
|
Out_Of_Date_From_Currency
|
The active period of the from currency is not included the
conversion rate period
|
Disabled_To_Currency
|
The currency is disabled or non-active in FND_CURRENCIES
|