You are on page 1of 3

9/2/2015

OracleApplications:OutboundInterfaceProcessinOracle
2

Home

AP

AR

More NextBlog

OM

PA

PO

HR

GL

INV

PLSQL

SCRIPTS

FAQS

CONV

TOOLS

OAF

WEDNESDAY,APRIL23,2014

OutboundInterfaceProcessinOracle
Outbound Interface process:
Outbound Interface will be used to extract the data from oracle Database tables into the flat files.
While developing the outbound Interface we will use UTL_File to Extract the data.
Inbound Interface will be used to upload the data from legacy system (Flat files) intoOracleAp
Oracle Applications base tables.
3.5klikes
While Developing the Inbound interface we will use SQL * loader to import the datainto
base tables.
UTL_FILE Package :
==================
LikePage
This is One of the PL/SQL Package which will be used to transfer the data from table to files from files to tablesBut 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.

Bethefirstofyourfriendsto
likethis

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.
Example:
TYPESelect * from v$parameter where name like '%utl_file%'
COPY ANY PATH IN THE ABOVE QUERY RESULT FOR OUTBOUND FILE DESTINATION
WE WILL USE THIS PATH IN PROCEDURE
NOTE: ONLY ABOVE QUERY PATHS ARE SUITABLE FOR OUTBOUND FILES
CREATEOUTBOUNDPROCEDURE

CREATEORREPLACEPROCEDUREXXAA_INV_OUTBOUND
(
ErrbufOUTVARCHAR2
,RetcodeOUTVARCHAR2
,f_idINNUMBER
,t_idINVARCHAR2
)
AS
CURSORc1
IS
SELECTmsi.segment1item,
msi.inventory_item_idItemid,
msi.descriptionitemdesc,
msi.primary_uom_codeUom,
ood.organization_namename,
ood.organization_idid,
mc.segment1
||','
||mc.segment2Category
FROMmtl_system_items_bmsi,
org_organization_definitionsood,

http://oracleapps88.blogspot.in/2014/04/outboundinterfaceprocessinoracle.html

1/3

9/2/2015

OracleApplications:OutboundInterfaceProcessinOracle

mtl_item_categoriesmic,
mtl_categoriesmc
WHEREmsi.organization_id=ood.organization_id
ANDmsi.inventory_item_id=mic.inventory_item_id
ANDmsi.organization_id=mic.organization_id
ANDmic.category_id=mc.category_id
ANDmsi.purchasing_item_flag='Y'
ANDmsi.organization_idBETWEENf_idANDt_id
ANDmsi.organization_id=204

x_idutl_file.file_type
l_countNUMBER(5)DEFAULT0

BEGIN
x_id:=utl_file.fopen('/usr/tmp','XXAA_INV_OUTBOUND.csv','W')
select*fromv$parameterwherenamelike'%utl_file%'
FORx1INc1
LOOP
l_count:=l_count+1
utl_file.put_line(x_id,x1.item||''||x1.itemid||''||x1.itemdesc||''||x1.uom||''||x1.name||''||x1.id||''||
x1.category)
ENDLOOP
utl_file.fclose(x_id)
Fnd_file.Put_line(Fnd_file.output,'NoofRecordstransferedtothedatafile:'||l_count)
Fnd_File.Put_line(fnd_File.Output,'')
Fnd_File.Put_line(fnd_File.Output,'SubmittedUsername'||Fnd_Profile.Value('USERNAME'))
Fnd_File.Put_line(fnd_File.Output,'')
Fnd_File.Put_line(fnd_File.Output,'SubmittedResponsibilityname'||Fnd_profile.value('RESP_NAME'))
Fnd_File.Put_line(fnd_File.Output,'')
Fnd_File.Put_line(fnd_File.Output,'SubmissionDate:'||SYSDATE)
EXCEPTION
WHENutl_file.invalid_operation
THEN
fnd_file.put_line(fnd_File.log,'invalidoperation')
utl_file.fclose_all
WHENutl_file.invalid_path
THEN
fnd_file.put_line(fnd_File.log,'invalidpath')
utl_file.fclose_all
WHENutl_file.invalid_mode
THEN
fnd_file.put_line(fnd_File.log,'invalidmode')
utl_file.fclose_all
WHENutl_file.invalid_filehandle
THEN
fnd_file.put_line(fnd_File.log,'invalidfilehandle')
utl_file.fclose_all
WHENutl_file.read_error
THEN
fnd_file.put_line(fnd_File.log,'readerror')
utl_file.fclose_all
WHENutl_file.internal_error
THEN
fnd_file.put_line(fnd_File.log,'internalerror')
utl_file.fclose_all
WHENOTHERS
THEN
fnd_file.put_line(fnd_File.log,'othererror')
utl_file.fclose_all
ENDXXAA_INV_OUTBOUND

RUN ABOVE PROCEDURE SUCCESSFULLY


GOTO SYSTEM ADMINISTRATOR
Create executable as pl/SQL stored procedure
Create concurrent program and attach the executable
Attach the concurrent program to Request Group
Attach the request group to responsibility
Run the request from Responsibility

http://oracleapps88.blogspot.in/2014/04/outboundinterfaceprocessinoracle.html

2/3

9/2/2015

OracleApplications:OutboundInterfaceProcessinOracle

BestBloggerGadgets
PostedbyRajuChat9:43PM

+2 Recommend this on Google

Labels:CONVERSIONS,SCRIPTS

4comments:
Anonymoussaid...
GoodOne....
April23,2014at11:04PM

ChanduSwathisaid...
CanuposttheInboundInterfacealso..
thanksinadvance..
September6,2014at10:34AM

JonamRamuksaid...
ExcellenetArticle...ThanksalotRaju
December21,2014at9:26PM

Anonymoussaid...
GoodJobFriend.IwasabouttodeveloponecriticalOutboundInterfaceinGL,Thiswouldreallyhelpme.
GodBlessyouRaju.
February10,2015at2:55PM

PostaComment

Enteryourcomment...

Commentas:

Publish

GoogleAccount

Preview

NewerPost

Home

OlderPost

Subscribeto:PostComments(Atom)

Follow@oracleapps88

28followers

Email:OracleApps88@Yahoo.Com.PictureWindowtemplate.Templateimagesbykonradlew.PoweredbyBlogger.

GetFlowerEffect

http://oracleapps88.blogspot.in/2014/04/outboundinterfaceprocessinoracle.html

3/3

You might also like