MOTO Confidential
MOTROLA
UpgradationProject
TechnicalDesign
GLDAILYRATESInterface
TD<Gap#xxxx>
Author:
N.Chandan Reddy
Creation Date:
25-Apr-2005
Last Updated:
26-Apr-2005
N.Chandan Reddy
Version:
Approvals
Name
Title
Date
MOTO Confidential
Contents
Overview
.3
Assumptions
.4
.5
.7
Data mapping
.9
Special logic
11
12
14
Open/Closed Issues
16
MOTO Confidential
Overview
The purpose of this deliverable is to document the technical
specifications for the Uploading of the daily rates into General
Ledger.The data should be loaded into the GL_DAILY_RATES table,but
you cannot directly load the data directly into that table. There is an
interface you can use to load this table, there is also a table by the
name of GL_DAILY_RATES_INTERFACE which is used to load the data
into GL_DAILY_RATES.
General Ledger uses the daily rates for the conversion of the foreign
currency into the functional currency. If we use General Ledgers
Multiple Reporting Currencies feature, the daily rates are used to
convert our primary set of books journals to the appropriate reporting
currencies when the journals are copied to our reporting sets of books.
Our daily rates must be defined before
we post journals in our primary set of books.
The GL_DAILY_RATES_INTERFACE is the table used to populate the
daily rates into the General Ledger.
General Ledger maintains one set of daily rates for all sets of books
within an Applications instance. In earlier releases, General Ledger
maintained a set of rates for each set of books.
MOTO Confidential
Assumptions
This design document assumes the following:
Import steps
The import process takes place in 5 steps:
Create a data file and also the control file and using the
Sql*Loader tool we need to transfer the data from the data
file to the staging table.
create
staging
table
MOTO Confidential
Property
Value
Name
Concurrent
name
<Comma delimited/Positional>
Incompatibility
<Itself/Program1/Program2/>
Replace or Append
<Insert/Append>
Restart restrictions
Validate program
Property
Value
Name
Validate<ObjectName>
Concurrent
name
Incompatibility
program MOT_Validate<ObjectName>
<ObjectName>
<Itself/Program1/Program2/>
MOTO Confidential
Processing mode
Pre-requisites
Restart restrictions
MOTO Confidential
MOT_Load
Type
SQL*Loader
Package name
MOT_CUSTOM
Filenames
Filename
PL/SQL packages
Loader scripts
MOT_GL_DAILY_RATES_LOAD.sql
Profile options
Profile option name :
Indexes
Index name
Filename
Running User
MOTO
MOTO Confidential
Load<ObjectName> Program
The Load <ObjectName> program is a SQL*Loader script. It loads an
import file into the following table(s)
n
Table1
Special
Format
(date
format,
decimal points)
MOT_FROM_CURRENCY
Varchar2(15)
MOT_TO_CURRENCY
Varchar2(15)
MOT_FROM_CONVERSION_DATE
Date
MOT_TO_CONVERSION_DATE
Date
MOT_USER_CONVERSION_TYPE
Varchar2(30)
MOT_CONVERSION_RATE
Number
MOT_MODE_FLAG
Varchar2(1)
MOT_INVERSE_CONVERSION
Number
_RATE
MOT_USER_ID
Number(15)
MOT_LAUNCH_RATE_CHANGE
Varchar2(1)
MOT_ERROR_CODE
Varchar2(30)
MOT_CONTEXT
Varchar2(150)
MOT_ATTRIBUTE1
Varchar2(150)
MOT_ATTRIBUTE2
Varchar2(150)
MOT_ATTRIBUTE3
Varchar2(150)
Position/Max
Length
MOTO Confidential
MOT_ATTRIBUTE4
Varchar2(150)
MOT_ATTRIBUTE5
Varchar2(150)
MOT_ATTRIBUTE6
Varchar2(150)
MOT_ATTRIBUTE7
Varchar2(150)
MOT_ATTRIBUTE8
Varchar2(150)
MOT_ATTRIBUTE9
Varchar2(150)
MOT_ATTRIBUTE10
Varchar2(150)
MOT_ATTRIBUTE11
Varchar2(150)
MOT_ATTRIBUTE12
Varchar2(150)
MOT_ATTRIBUTE13
Varchar2(150)
MOT_ATTRIBUTE14
Varchar2(150)
MOT_USED_FOR_AB_TRAN-
Varchar2(1)
-SLATION
MOT_ATTRIBUTE15
Varchar2(150)
Data mapping
GL_DAILY_RATES_I
NTERFACE
FROM_CURRENCY
MOT_FROM_CURRENC
Y
FROM_CONVERSION_
DATE
MOT_FROM_CONVERS
ION_DATE
TO_CONVERSION_DA
TE
MOT_TO_CONVERSIO
N_DATE_
USER_CONVERSION_T
YPE
MOT_USER_CONVERS
ION_TYPE
Transformation logic
MOTO Confidential
CONVERSION_RATE
MOT_CONVERSION_R
ATE
MODE_FLAG
MOT_MODE_FLAG
INVERSE_CONVERSIO
N_RATE
MOT_INVERSE_CONV
ERSION_RATE
USER_ID
MOT_USER_ID
LAUNCH_RATE_CHAN
GE
MOT_LAUNCH_RATE_
CHANGE
ERROR_CODE
MOT_ERROR_CODE
CONTEXT
MOT_CONTEXT
ATTRIBUTE1
MOT_ATTRIBUTE1
ATTRIBUTE2
MOT_ATTRIBUTE2
ATTRIBUTE3
MOT_ATTRIBUTE3
ATTRIBUTE4
MOT_ATTRIBUTE4
ATTRIBUTE5
MOT_ATTRIBUTE5
ATTRIBUTE6
MOT_ATTRIBUTE6
ATTRIBUTE7
MOT_ATTRIBUTE7
ATTRIBUTE8
MOT_ATTRIBUTE8
ATTRIBUTE9
MOT_ATTRIBUTE9
ATTRIBUTE10
MOT_ATTRIBUTE10
ATTRIBUTE11
MOT_ATTRIBUTE11
ATTRIBUTE12
MOT_ATTRIBUTE12
ATTRIBUTE13
MOT_ATTRIBUTE13
ATTRIBUTE14
MOT_ATTRIBUTE14
MOTO Confidential
USED_FOR_AB_TRAN
SLATION
MOT_USED_FOR_AB_
TRANSLATION
ATTRIBUTE15
MOT_ATTRIBUTE15
Special logic
Using SQL*Loader, just transferring the data from staging table to
Interface Table. Then transfer the data from Interface Table to Base Table
using PL/SQL Scripts. I am using FOR Cursor to make the process very
Simple and Efficient .
The control file is:
LOAD DATA
INFILE
D:\ORACLE\PRODAPPL\MOTOROLA\11.5.0\BIN\MOT_GL_DAILY_RATES_LOAD.txt
APPEND
INTO TABLE MOT_GL_DAILY_RATES
FIELDS TERMINATED BY ','
TRAILING NULLCOLS
(FROM_CURRENCY CHAR
, TO_CURRENCY CHAR
, FROM_CONVERSION_DATE DATE
, TO_CONVERSION_DATE DATE
, USER_CONVERSION_TYPE CHAR
, CONVERSION_RATE
DECIMAL EXTERNAL
, MODE_FLAG
CHAR)
MOTO Confidential
2.
3.
Assigns defaults
interface table(s).
4.
5.
Other.
to
records
in
<TableName>
Defaults
The functional currency or the TO_CURRENCY is
specified.
already
Conversions
The columns which are specified below are the mandatory
columns.The data for these columns must be specified for
the data conversion :
FROM_CURRENCY,TO_CURRENCY,FROM_CONVERSION_DATE
,TO_CONVERSION_DATE,USER_CONVERSION_TYPE,
CONVERSION_RATE, MODE_FLAG.
Validations
The main validation is the trigger
(GL_DAILY_RATES_INTERFACE_AI) should be enabled else
the insertion,updation and deletion cannot be done.
To see whether the trigger is enabled or not :
select status from dba_triggers where
trigger_name=GL_DAILY_RATES_INTERFACE_AI
if not enabled then we have to enable the trigger.
MOTO Confidential
Table name
Column name
Validation logic
GL_DAILY_RATES_I
NTERFACE
FROM_CONVERSION
_DATE
TO_CONVERSION_D
ATE
USER_CONVERSION
_TYPE
Other logic
<List all other logic>
Exception handling
The Validate <ObjectName> program performs all validations and
transfer of data from one table to other table first.
<All or none>
Since it operates in an all or none mode, the program checks if there
were any conversion or validation errors, and if so it does some or all of the
following
n
<Partials allowed>
Since it operates in a partials allowed mode, the validation program
writes individual error status to records in the interface table, then proceeds
with defaulting and other logic. It does report errors in the log file or by
setting an error status on interface records.
The trigger GL_DAILY_RATES_INTERFACE_AI validates the data and
transfers the data from the GL_DAILY_RATES_INTERFACE table to the base
table(GL_DAILY_RATES).
MOTO Confidential
Conversions
Validations
Parameter name
Prompt
Default
Required
specification
Body
Directory
d:\oracle\visappl\MOT\11.5.0\sql
Package name
MOT _DAILY_CUSTOM
Conc. program
N/A <ObjectName>
Procedures
MOT_PP_Validate <ObjectName>
Functions
MOT_VALIDATE_DATE
MOTO Confidential
Procedure
MOT_GL_DAILY_RATES_LOAD (for loading data into
GL_DAILY_RATES_INTERFACE table from staging table).
Create or replace procedure MOT_GL_DAILY_RATES_LOAD
(errbuf out varchar2 ,retcode out varchar2) is
cursor c1 is select * from MOT_DAILY_RATES_INTERFACE;
begin
for mot in c1
loop
insert into GL.GL_DAILY_RATES_INTERFACE values(
mot.FROM_CURRENCY
,
mot.TO_CURRENCY
,
mot.FROM_CONVERSION_
,
mot.TO_CONVERSION_
,
mot.USER_CONVERSION_TYPE
,
mot.CONVERSION_RATE
,
mot.MODE_FLAG
,
mot.INVERSE_CONVERSION_RATE ,
mot.USER_ID
,
mot.LAUNCH_RATE_CHANGE
,
mot.ERROR_CODE
,
mot.CONTEXT
,
mot.ATTRIBUTE1
,
mot.ATTRIBUTE2
,
mot.ATTRIBUTE3
,
mot.ATTRIBUTE4
,
mot.ATTRIBUTE5
,
mot.ATTRIBUTE6
,
mot.ATTRIBUTE7
,
mot.ATTRIBUTE8
,
mot.ATTRIBUTE9
,
mot.ATTRIBUTE10
,
mot.ATTRIBUTE11
,
mot.ATTRIBUTE12
,
mot.ATTRIBUTE13
,
mot.ATTRIBUTE14
,
mot.USED_FOR_AB_TRANSLATION ,
mot.ATTRIBUTE15 );
End loop;
End MOT_GL_DAILY_RATES_LOAD;
MOTO Confidential
Open/Closed Issues
Open issues
Num
Issue description
Resolution
Owner
Resolution
Owner
Closed issues
Num
Issue description
Open Periods