Infolinks

Tuesday 15 May 2012

Interfaces

                         Interfaces:

            -----------------------------


Interface is one of the Program which will be used to transfer the data from Oracle
database tables in to flat file   (or)
Flat files      into  Database tables

We have two types of Interfaces.

1)Inbound Interface
2)outbound Interface

Outbound Interface will be used to extract the data from oracle Database tables into
the flat files.

Inbound Interface will be used to upload the data from legacy system (Flat files) into
Oracle Applications base tables.

While developing the outbound Interface we will use UTL_File to Extract the data.
While Developing the Inbound interface  we will use SQL * loader to import the data
into base taqbles.


UTL_FILE Package :
==================

this is One of the PL/SQL Package which will be used to transfer the data
from table to files
from files to tables

But when we are working for file to table we will use SQl *Loader
to transfer from table to file we have no alternative we have to use UTL_FILE.

We will use following three functions to generate the file.

1)Utl_File.fopen     = To open (or) Create the file
2)Utl_File.Put_line  = To Transfer the data into the File.
3)Utl_File.fclose    = To close the File after Data transfer.



outbound Interface Process:
=============================

1)Develop the PL/SQL Program (Either Procedure or Package)
2)Write the Cursor to retrieve the data from database tables.
3)Create file or Open the File by using UTL_File.fopen().
4)Open the Cursor
5)If any validations are there write the validations
6)Transfer the Data into File by using UTL_File.Put_Line().
7)Close the Cursor.
8)Close the File by using UTL_File.fclose();
9)Register the Procedure or Package as Concurrent Program and submit from SRS Window.



For Ex : We required the flat file with following Format.

Supplierno,Supliername,Cdate,Sitename


Develop the Program to Transfer Supplier Purchase orders datainto file


Supplier No from
Supplier No To 

PoNumber,POtype,Amount,Cdate,No,Name,Site


Validations:

1)If Parameters are null select all the supplier details
2)If 'from' is given  'To' is not given take till Last Supplier
3)If 'To' is given and 'from' is not given take from first.
4)If Purchase order amount is more then 3500 then only transfer into file.

No comments:

Post a Comment