Академический Документы
Профессиональный Документы
Культура Документы
Interfaces
INTERFACES
Interface is nothing but a program will be used to transfer the data from flat files to database table or
from database table to flat files with validations. WE have two types of Interfaces like Inbound Interface
Outbound Interface.
Inbound Interface
It will be used to upload the data from legacy system into Oracle Applications base table
Note: Legacy system is nothing but other applications which is used by client like SAP, JAVA, Mainframe
so on.
Example: In implementation project we can implement forms and report so that users can enter the
data after implementation but the previous data will be available in the legacy system we need to bring
that data in to Oracle Applications with validations.
Outbound Interface
It will be used to extract the data from Oracle Applications base tables in to flat files
Example: Client is using to applications one is for financial and another one is for manufacturing, we
have to transfer manufacture data in to financial applications, so that we can generate the Invoices in
financial applications.
Usage: UTL_FILE_PACKAGE
UTL_FILE.FOPEN() – Crate / Open file
UTL_FILE.PUT_LINE() – Transfer the data in to file
UTL_FILE.FCLOSE() – Close file
Exercise – OUTBOUND INTERFACE
We can generate flat file only in specified directory – to find directory list
Select * from V$PARAMETER Where NAME like ‘%UTL_%
Or
“INIT.ORA” file contains the information about active directory list.
Process Steps
1) Develop a procedure or package and register it as Concurrent Program
2) Writ the cursor to retrieve the data from database
3) Define the file by using UTL_FILE.FOPEN()
4) Open the cursor for loop and transfer the data in to file by using UTL_FILE.PUT_LINE()
5) Close the cursor and close the file by using UTL_FILE.FCLOSE()
Process Steps:
Develop the PL/SQL program to validate the data weather it is valid or not, if it is valid we will insert
in to interface table, if it is not valid we will insert in to error table.
Once the data is available in interface table submit the standard program from SRS window, and we
will transfer the data from interface table to base tables.
Note
Staging table is required because the flat file structure may or may not be compatibles with base table
structure.
Interface table is required to make the pre validation and populate dynamic records.
GL Interface
GL_INTERFACE_TABLE
STATUS: This column will accept any string but we will always insert standards string called new it
indicates that we are brining new data in to General Ledge Applications.
SET_OF_BOOKS_ID: We have to enter the appropriate set of books ID, it should be valid set of books id
is available in GL_SETS_BOOKS table it is valid, otherwise i8t is invalid.
USER_JE_SOURCES_NAME: We have to enter the journal sources name for the transaction we can find all
the valid source names in the tabled called GL_JE_SOURCES.
CURRENCY_CODE: We have to enter the valid currency code in FND_CURREINCES table we can find out
weather it is valid or not.
ACCOUNTING_DATE and CREATION_DATE: Both columns will accept valid date but that date should be
less than or equal to System date.
CREATED_BY: WE have to enter valid user_id from FND_USER table we can identify weather it is valid
user_id or not.
PERIOD_NAME: We have to enter valid period name and period should be in the open status from
GL_PERIODS table we can find out weather it is valid period or not, from GL_PERIOD_STATUS table
we can find out period is in the open status or not.
ENTERED_DR and ENTERED_CR: Both columns will accept positive number Debit and credit amount,
both debit and credit should be equal otherwise account will be imported as suspense account.
GROUP_ID: WE will enter unique group number while importing from interface table to base table it will
be used as parameter.
CTUAL_FLAG: This column will accept single character either ‘A’ or ‘B’ or ‘E’ a- Actual amounts, B-
Budget Amounts, E- Encumbrance Amounts
i. declare Cursor
ii. open cursor
iii. Validate each record
iv. If no invalid record then insert into interface table.
5) Run the journal import from GL => Journal => Import => Run
i. Give the two parameters 1)Source 2)Group ID
6) Open the Output if status is ‘SUCEESS’ then take Request ID.
7) open Journal Enter screen Query the records based on the %requestid% As batch Name – Select
Review journal button we can see the journal detailed transaction
8) If we want correct the journals we can correct from Journal=>Import=>Correct
9) If we want delete the journals we can delete from Journal=>Import=>Delete
Control File Creation – To transfer the data from flat file to staging table.
LOAD DATA
INFILE *
INSERT INTO TABLE GL_INT_TEMP
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
(STATUS,
SET_OF_BOOKS_ID,
ACCOUNTING_DATE,
CURRENCY,
DATE_CREATED,
CREATED_BY,
ACTUAL_FLAG,
CATEGORY,
SOURCE,
CURR_CONVERSION,
SEGMENT1,
SEGMENT2,
SEGMENT3,
SEGMENT4,
SEGMENT5,
ENTERED_DR,
ENTERED_CR,
ACCOUNTED_DR,
ACCOUNTED_CR,
GROUP_ID)
BEGINDATA
"NEW",1,"11-AUG-2002","USD","11-AUG-2002",1318,"A","Inventory","JETFORMS","Corporate","01","000","1410",
"NEW",1,"11-AUG-2002","USD","11-AUG-2002",1318,"A","Inventory","JETFORMS","Corporate","01","000","1410",
"NEW",1,"11-AUG-2002","USD","11-AUG-2002",1318,"A","Inventory","JETFORMS","Corporate","01","000","1410",
"NEW",1,"11-AUG-2002","USD","11-AUG-2002",1318,"A","Inventory","JETFORMS","Corporate","01","000","1410",
"NEW",1,"11-AUG-2002","SGD","11-AUG-2002",1318,"K","Inventory","JETFORMS","Corporate","01","000","1410",
"NEW",1,"11-AUG-2002","EUR","11-AUG-2002",1318,"A","Inventory","JETFORMS","Corporate","01","000","1410",
Creation of PL/SQL procedure – to transfer the data from staging table to interface table after
validation.
END GL_INTER;
/
Package Body:
Overview:
Oracle provides flexible tools in the form of Interface programs to import the
master and transactional data like Customers, Invoices, and Sales Orders
etc from external systems into Oracle Applications or to transfer the data
from one module to another module.
1)Inbound Interface: will be used to upload the data from legacy system
(Flat files) into Oracle Applications base tables.
2)Outbound Interface: will be used to extract the data from oracle Database
tables into the flat files.
Conversion/Interface Strategy:
1. Data Mapping
During the data mapping process, list of all the data sets and data
elements that will need to be moved into the Oracle tables as part of
conversion are identified. Data mapping tables are prepared as part of
this activity that show what are the data elements that are needed by the
target system to meet the business requirements and from where they
will be extracted in the old system.
2. Download Programs
After the conversion data mapping is complete, download programs are
developed that are used to extract the identified conversion data
elements from the current systems in the form of an ASCII flat file. The
structure of the flat file must match the structure of the Oracle standard
interface tables. These flat files generated may be in text form or a
comma or space delimited, variable or fixed format data file.
3. Upload Program
Once the data has been extracted to a flat file, it is then moved to the
target file system and the data from the file is loaded into user defined
staging tables in the target database using SQL Loader or UTL_FILE
utilities. Then programs are written and run which validate the data in the
staging tables and insert the same into the Oracle provided standard
Interface tables.
4. Interface Program
Once the interface tables are populated, the respective interface program
(each data element interface has a specific interface program to run) is
submitted. The interface programs validate the data, derive and assign
the default values and ultimately populate the production base tables.
A typical path to transfer the data from Legacy System to Oracle Apps: