Anda di halaman 1dari 16

FS 030 Technical Specifications

MOTO Confidential

MOTROLA
UpgradationProject
TechnicalDesign
GLDAILYRATESInterface
TD<Gap#xxxx>
Author:

N.Chandan Reddy

Creation Date:

25-Apr-2005

Last Updated:

26-Apr-2005

Last Updated By:

N.Chandan Reddy

Version:
Approvals

Name

Title

FS 030 Name: MOTO TS GL DAILY RATES Interface


-1-

Date

FS 030 Technical Specifications

MOTO Confidential

Contents
Overview

.3

Assumptions

.4

High level program information

.5

Import program components

.7

Data mapping

.9

Special logic

11

Validate <ObjectName> Program

12

PL/SQL Package Design

14

Open/Closed Issues

16

FS 030 Name: MOTO TS GL DAILY RATES Interface


-2-

FS 030 Technical Specifications

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.

FS 030 Name: MOTO TS GL DAILY RATES Interface


-3-

FS 030 Technical Specifications

MOTO Confidential

Assumptions
This design document assumes the following:

General Ledger setup is complete.

Accounting structure and the Set of books are defined.

Conversion rates and types are specified.

Check the trigger GL_DAILY_RATES_INTERFACE_AI is enabled .

Coversion dates are specified.

Import steps
The import process takes place in 5 steps:

The first thing is to


(MOT_GL_DAILY_RATES).

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.

Once the data is in the staging table we need to do all the


necessary validations.

Now a procedure is created to transfer the data from the


staging table to the Interface table.A Concurrent Program
executable file is created and run .

The data is transferred to the Interface table and here the


trigger named GL_DAILY_RATES_INTERFACE_AI should be
enabled so that the data in the Interface table is validated
and the base table(GL_DAILY_RATES) is populated.

FS 030 Name: MOTO TS GL DAILY RATES Interface


-4-

create

staging

table

FS 030 Technical Specifications

MOTO Confidential

High level program information


The following lists summarize the Import <ObjectName>
program information:
Load program

Property

Value

Name

Load Daily Rates

Concurrent
name

program MOT_GL_DAILY_RATES_LOAD <ObjectName>

Import file format

<Comma delimited/Positional>

Incompatibility

<Itself/Program1/Program2/>

Replace or Append

<Insert/Append>

Initial record status

<Records are immediately available for Standard


interface program/ Records are in Xxxx status
and
must
be
processed
by
the
Validate<ObjectName> program before they are
available for the standard interface program>

Full import file name

MOT/BIN/.txt or .dat extension

Restart restrictions

<None/Yes> If Yes, Explain

Validate program

Property

Value

Name

Validate<ObjectName>

Concurrent
name
Incompatibility

program MOT_Validate<ObjectName>
<ObjectName>
<Itself/Program1/Program2/>

FS 030 Name: MOTO TS GL DAILY RATES Interface


-5-

FS 030 Technical Specifications

MOTO Confidential

Processing mode

<All or none/Partials allowed>

Pre-requisites

<None/Program1 must run before this program>

Restart restrictions

<None/Yes> If Yes, Explain

FS 030 Name: MOTO TS GL DAILY RATES Interface


-6-

FS 030 Technical Specifications

MOTO Confidential

Import program components


The following list contains all components required to completely install
the Import <ObjectName> program:
Concurrent programs
Name

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

FS 030 Name: MOTO TS GL DAILY RATES Interface


-7-

MOTO

FS 030 Technical Specifications

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

Import file format


The import file is <Comma delimited> and has the following format:
Column name

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)

FS 030 Name: MOTO TS GL DAILY RATES Interface


-8-

Position/Max
Length

FS 030 Technical Specifications

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

Oracle table name

Oracle column name

Extract column name

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

FS 030 Name: MOTO TS GL DAILY RATES Interface


-9-

Transformation logic

FS 030 Technical Specifications

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

FS 030 Name: MOTO TS GL DAILY RATES Interface


- 10 -

FS 030 Technical Specifications

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)

FS 030 Name: MOTO TS GL DAILY RATES Interface


- 11 -

FS 030 Technical Specifications

MOTO Confidential

Validate <ObjectName> Program


The validate <ObjectName> program is a PL/SQL concurrent program
that performs the following:
1.

Converts some column values into their Oracle


equivalents

2.

Validates some interface table columns

3.

Assigns defaults
interface table(s).

4.

Inserts additional records in the <TableName> table


for every loaded record.

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.

FS 030 Name: MOTO TS GL DAILY RATES Interface


- 12 -

FS 030 Technical Specifications

MOTO Confidential

Table name

Column name

Validation logic

GL_DAILY_RATES_I
NTERFACE

FROM_CONVERSION
_DATE

The date specified


here
should
be
accepted by Oracle
date format.

TO_CONVERSION_D
ATE

The date specified


here
should
be
accepted by Oracle
date format.

USER_CONVERSION
_TYPE

The coversion type


specidied should be
available and should
be in the similar case
specified in ORACLE
11i.

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

commits error status to the interface table records and


aborts processing.
Writes error information to the log file and aborts
processing

<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).

FS 030 Name: MOTO TS GL DAILY RATES Interface


- 13 -

FS 030 Technical Specifications

MOTO Confidential

Main error conditions

Conversions

Validations

Validate <ObjectName> program parameters


The Validate <ObjectName> program runs with the following
parameters:

Parameter name

Prompt

Value set name

Default

Required

PL/SQL Package Design


Filename

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

Global constants and variables.


These constants are global only to the package. Meaning, they should
be defined in the package body.

FS 030 Name: MOTO TS GL DAILY RATES Interface


- 14 -

FS 030 Technical Specifications

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;

FS 030 Name: MOTO TS GL DAILY RATES Interface


- 15 -

FS 030 Technical Specifications

MOTO Confidential

Open/Closed Issues
Open issues

Num

Issue description

Resolution

Owner

Resolution

Owner

Closed issues

Num

Issue description

Enabling the TRIGGER

Open Periods

FS 030 Name: MOTO TS GL DAILY RATES Interface


- 16 -

Anda mungkin juga menyukai