Académique Documents
Professionnel Documents
Culture Documents
http://oracleapps4people.blogspot.com/2012/05/oracle-apps-part-j.html?view=flipcard 1/14
1/22/2019 ORACLE APPS PART J | be happy and make others to be happy
CLASS – 41
Inbound Interface
Process Steps:
1) Stage Table Cration
2) Control file development
3) PL/SQL Program
4) Submit Standard Program
· Inbound interface will be used to upload the data from legacy system in to Oracle applications base
tables.
· We will receive the flat file from the client then we will create staging table upload the data from flat file
in to stage table.
· 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
o Staging table is required because the flat file structure may or may not be compatibles with base
table structure.
o Interface table is required to make the pre validation and populate dynamic records.
PO
GL AP AR OM HRMS
· Journals · Requisitions · Invoices · Customers · Sales · Employees
· Currency · RFQ · Payments Invoices Orders
Conversion · Quotations Receipts
· Daily · Purchase
Conversion Orders
Rates
GL Interface
CLASS – 42
GL_INTERFACE_TABLE
http://oracleapps4people.blogspot.com/2012/05/oracle-apps-part-j.html?view=flipcard 2/14
1/22/2019 ORACLE APPS PART J | be happy and make others to be happy
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
http://oracleapps4people.blogspot.com/2012/05/oracle-apps-part-j.html?view=flipcard 3/14
1/22/2019 ORACLE APPS PART J | be happy and make others to be happy
Process Steps:
1) We have received flat file from client
2) We have created Staging table as per flat file structure
3) Developed Control file and uploaded data
4) Developed PL/SQL Program to upload the data from stage into interface table
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
http://oracleapps4people.blogspot.com/2012/05/oracle-apps-part-j.html?view=flipcard 4/14
1/22/2019 ORACLE APPS PART J | be happy and make others to be happy
ACCOUNTED_CR Number(8),
GROUP_ID Number(8) );
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","0000","000",555,555,555,555,66
"NEW",1,"11-AUG-2002","USD","11-AUG-
2002",1318,"A","Inventory","JETFORMS","Corporate","01","000","1410","0000","000",554,554,554,554,66
"NEW",1,"11-AUG-2002","USD","11-AUG-
2002",1318,"A","Inventory","JETFORMS","Corporate","01","000","1410","0000","000",321,321,321,321,66
"NEW",1,"11-AUG-2002","USD","11-AUG-
2002",1318,"A","Inventory","JETFORMS","Corporate","01","000","1410","0000","000",431,431,431,431,66
"NEW",1,"11-AUG-2002","SGD","11-AUG-
2002",1318,"K","Inventory","JETFORMS","Corporate","01","000","1410","0000","000",1500,1500,1500,1500,66
"NEW",1,"11-AUG-2002","EUR","11-AUG-
2002",1318,"A","Inventory","JETFORMS","Corporate","01","000","1410","0000","000",1600,1600,1600,1600,66
Creation of PL/SQL procedure – to transfer the data from staging table to interface table after validation.
http://oracleapps4people.blogspot.com/2012/05/oracle-apps-part-j.html?view=flipcard 5/14
1/22/2019 ORACLE APPS PART J | be happy and make others to be happy
-- cursor declaration
CURSOR gl_cur IS
SELECT
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
FROM GL_INT_TEMP;
l_currencycode VARCHAR2(25);
l_set_of_books_id NUMBER(3);
l_flag VARCHAR2(2);
l_error_msg VARCHAR2(100);
l_err_flag VARCHAR2(10);
l_category VARCHAR2(100);
L_USERID NUMBER(10);
BEGIN
DELETE FROM gl_interface;
COMMIT;
FOR rec_cur IN gl_cur LOOP
l_flag:='A';
l_err_flag:='A';
--This PL/SQL Block will do the currency validation
--end of the currency validation
--Category Column Validation
BEGIN
SELECT USER_JE_CATEGORY_NAME
INTO l_CATEGORY
FROM GL_JE_CATEGORIES
WHERE USER_JE_CATEGORY_NAME = REC_CUR.Category;
EXCEPTION
WHEN OTHERS THEN
l_category:=NULL;
l_flag:='E';
l_error_msg:='Category does not exist ';
END;
http://oracleapps4people.blogspot.com/2012/05/oracle-apps-part-j.html?view=flipcard 6/14
1/22/2019 ORACLE APPS PART J | be happy and make others to be happy
http://oracleapps4people.blogspot.com/2012/05/oracle-apps-part-j.html?view=flipcard 7/14
1/22/2019 ORACLE APPS PART J | be happy and make others to be happy
http://oracleapps4people.blogspot.com/2012/05/oracle-apps-part-j.html?view=flipcard 8/14
1/22/2019 ORACLE APPS PART J | be happy and make others to be happy
END GL_IN_PRO;
CLASS – 43
CLASS – 44
PO_HEADERS_INTEFACE
Pre Requisites
Process Steps
1)
Create the Staging tables
2)
Develop the Control files and register as concurrent program
3)
Develop the PL/SQL Program and write the validations and insert into interface table
4)
Run the standard program called Import Standard Purchase orders from PO Responsibility
Parameter : Default Buyer : Null
Create or update items : No
PO Status : APPROVED
Batch ID : 13
(We can get from headers interface table)
5) Take the Request ID execute following query we can get the PO numbers
select segment1 Ponumber
from po_headers_all
where request _id = 145233;
6) Go to the PO Application and Query the PO from as per the PO number.
Control File: - PO_HEADERS_INTERFACE
load data
infile *
TRUNCATE into table XX_HEADERS
fields terminated by "," optionally enclosed by '"'
TRAILING NULLCOLS
( INTERFACE_HEADER_ID
,BATCH_ID
,ACTION
,ORG_ID
,DOCUMENT_TYPE_CODE
,CURRENCY_CODE
,AGENT_NAME
,VENDOR_NAME
,VENDOR_SITE_CODE
,SHIP_TO_LOCATION
,BILL_TO_LOCATION
,APPROVAL_STATUS
,FREIGHT_CARRIER
,FOB
,FREIGHT_TERMS
)
BEGINDATA
1,13,"ORIGINAL",204,"STANDARD","USD","Stock, Ms. Pat","IBM","IBM-BAN","H1- Detroit","V1- New York
City","APPROVED","UPS","Origin","Due"
http://oracleapps4people.blogspot.com/2012/05/oracle-apps-part-j.html?view=flipcard 10/14
1/22/2019 ORACLE APPS PART J | be happy and make others to be happy
load data
infile *
insert into table XX_LINES
fields terminated by "," optionally enclosed by '"'
TRAILING NULLCOLS
( interface_header_id
,interface_line_id
,LINE_NUM
,SHIPMENT_NUM
,LINE_TYPE
,ITEM
,ITEM_DESCRIPTION
,item_id
,UOM_CODE
,QUANTITY
,UNIT_PRICE
,SHIP_TO_ORGANIZATION_CODE
,SHIP_TO_LOCATION
,list_price_per_unit)
BEGINDATA
1,1,2,2,"Goods","AS54999","Sentinel Standard Desktop - Rugged",2155,"Ea",10,120,"M1","Adelaide",45
1,2,3,3,"Goods","75100005","Colour Cartidge",6076,"Ea",11,111,"M1","Adelaide",55
1,3,4,4,"Goods","AS54999","Sentinel Standard Desktop - Rugged",2155,"Ea",1,1400,"M1","Adelaide",65
Procedure for Insertions of data from Interface tables to Base tables after validating.
http://oracleapps4people.blogspot.com/2012/05/oracle-apps-part-j.html?view=flipcard 11/14
1/22/2019 ORACLE APPS PART J | be happy and make others to be happy
FROM po_vendors
WHERE vendor_name = x1.VENDOR_NAME;
-- AND ORG_ID = Fnd_Profile.Value('ORG_ID');
EXCEPTION
WHEN OTHERS THEN
l_flag := 'E';
l_vendor_id := 0;
l_msg := 'Vendor id is Not in SYSTEM';
END;
--Vendor Site code Validation
/* begin
select vendor_site_code
into l_site_code
from po_vendor_sites_all
where vendor_site_code = x1.vendor_site_code;
EXCEPTION
WHEN OTHERS THEN
l_flag := 'E';
l_site_code := 0;
l_msg := 'Vendor Site Code is Not in SYSTEM';
END;*/
--End of Site Code Validation
--Currency Code Validation
Begin
select currency_code
into l_curr_code
from fnd_currencies
where currency_code = x1.CURRENCY_CODE;
EXCEPTION
WHEN OTHERS THEN
l_flag := 'E';
l_curr_code := 0;
l_msg := 'Currency Code is Invalid';
END;
--End of te Currency Validation
--Operating Unit ID Validation
Begin
select organization_id
into l_org_id
from hr_operating_units
where organization_id = x1.org_id;
EXCEPTION
WHEN OTHERS THEN
l_flag := 'E';
l_org_id := 0;
l_msg := 'Invalid Organization ID';
END;
--End of the ORG ID Validation
IF l_flag != 'E' THEN
INSERT INTO po_headers_interface
(
http://oracleapps4people.blogspot.com/2012/05/oracle-apps-part-j.html?view=flipcard 12/14
1/22/2019 ORACLE APPS PART J | be happy and make others to be happy
INTERFACE_HEADER_ID
,BATCH_ID
,ACTION
,ORG_ID
,DOCUMENT_TYPE_CODE
,CURRENCY_CODE
,AGENT_NAME
,VENDOR_NAME
,VENDOR_SITE_CODE
,SHIP_TO_LOCATION
,BILL_TO_LOCATION
,creation_date
,APPROVAL_STATUS
,APPROVED_DATE
,FREIGHT_TERMS
)
VALUES
(
x1.INTERFACE_HEADER_ID
,x1.batch_id
,x1.action
,x1.org_id
,x1.document_type_code
,x1.CURRENCY_CODE
,x1.AGENT_NAME
,x1.VENDOR_NAME
,x1.VENDOR_SITE_CODE
,x1.SHIP_TO_LOCATION
,x1.BILL_TO_LOCATION
,SYSDATE-10
,x1.APPROVAL_STATUS
,SYSDATE
,x1.FREIGHT_TERMS
);
end if;
END LOOP;
FOR x2 IN c2 LOOP
l_flag := 'A';
--Item Validation
begin
select segment1
into l_item
from mtl_system_items_b
where segment1 = x2.item
AND ORGANIZATION_ID = fnd_profile.value('ORG_ID');
exception
when others then
l_flag := 'E';
l_vendor_id := 0;
l_msg := 'Item is not valid Item';
END;
http://oracleapps4people.blogspot.com/2012/05/oracle-apps-part-j.html?view=flipcard 13/14
1/22/2019 ORACLE APPS PART J | be happy and make others to be happy
View comments
http://oracleapps4people.blogspot.com/2012/05/oracle-apps-part-j.html?view=flipcard 14/14