0% found this document useful (0 votes)
328 views2 pages

GL Journal Import For Multiple Journal Sources

This document discusses how to import general ledger journals from multiple journal sources in Oracle Applications using a single PL/SQL procedure call. It describes inserting control records into the GL_INTERFACE_CONTROL table for each source, with the same interface_run_id value. The code sample shows inserting records for 'Receivables' and 'Payables' sources and submitting the GL import request via FND_REQUEST.SUBMIT_REQUEST, importing journals for multiple sources in a single call.

Uploaded by

hisham_476
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
328 views2 pages

GL Journal Import For Multiple Journal Sources

This document discusses how to import general ledger journals from multiple journal sources in Oracle Applications using a single PL/SQL procedure call. It describes inserting control records into the GL_INTERFACE_CONTROL table for each source, with the same interface_run_id value. The code sample shows inserting records for 'Receivables' and 'Payables' sources and submitting the GL import request via FND_REQUEST.SUBMIT_REQUEST, importing journals for multiple sources in a single call.

Uploaded by

hisham_476
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

2/27/2017 GLJournalImportforMultipleJournalSourcesquest4apps

GLJournalImportforMultipleJournalSources
In my previousposton how to Submit GL Import from PL/SQL. The example given in that blog was for importing Journals
pertaining to one particular Journal Source.

What if you had multiple Journal Source like Receivables,Payables etc?


How will you submit the gl import and make sure that the journals pertaining to all the sources are imported?
Do we have to submit GL Import for each of the sources separately?

If you have the same questions as above, then please read on. Also have a look at my previous blog onGL Import.

You can useFND_REQUEST.SUBMIT_REQUESTto call the GL Import program from a PL/SQL Procedure.

Before we call the GL Import program, we need to make sure that control records are inserted
intoGL_INTERFACE_CONTROLTable for each of the sources that we are trying to import.
For example if you have journals from Receivables and Payables, you need to insert two separate records into
GL_INTERFACE_CONTROL Table.
One for Receivables Journal source and one for Payables Journal Source. However,make sure that the interface_run_id value is
the same for both the records.In the same way you need to insert separate records into GL_INTERFACE_CONTROL Table for
each of the sources and keeping the same interface_run_id value for all the records.

The below code snippet is for importing Journals pertaining to Receivables and Payables. You can also download the PDF
Version by clicking on Multiple GL Sourceslink.

<pre>DECLARE

l_conc_idNUMBER;
l_int_run_idNUMBER;
l_access_set_idNUMBER;
l_org_idNUMBER:=101;
l_sob_idNUMBER:=101;
l_user_idNUMBER:=FND_GLOBAL.USER_ID;
l_resp_idNUMBER:=FND_GLOBAL.RESP_ID;
l_resp_app_idNUMBER:=FND_GLOBAL.RESP_APPL_ID;

BEGIN

fnd_global.apps_initialize
(user_id=>l_user_idUserId
,resp_id=>l_resp_idResponsibilityId
,resp_appl_id=>l_resp_app_idResponsibilityApplicationId
);
mo_global.set_policy_context('S',l_org_id);

SELECTgl_journal_import_s.NEXTVAL
INTOl_int_run_id
FROMdual;

SELECTaccess_set_id
INTOl_access_set_id
FROMgl_access_sets
WHEREname='VISIONOPERATIONSSET';

INSERTINTOgl_interface_control
(
je_source_name
,interface_run_id
,status
,set_of_books_id
)
VALUES

(
http://www.quest4apps.com/gljournalimportformultiplejournalsources/ 1/2
2/27/2017 GLJournalImportforMultipleJournalSourcesquest4apps
(
'Receivables'
,l_int_run_id
,'S'
,l_sob_id
);

INSERTINTOgl_interface_control
(
je_source_name
,interface_run_id
,status
,set_of_books_id)
VALUES
(
'Payables'
,l_int_run_id
,'S'
,l_sob_idsameinterface_run_idforboththerecords.
);

l_conc_id:=fnd_request.submit_request
(
application=>'SQLGL'
,program=>'GLLEZL'
,description=>NULL
,start_time=>SYSDATE
,sub_request=>FALSE
,argument1=>l_int_run_idinterfacerunid
,argument2=>l_access_set_iddataaccessset_id
,argument3=>'N'posttosuspense
,argument4=>NULLfromdate
,argument5=>NULLtodate
,argument6=>'N'summarymode
,argument7=>'N'importDFF
,argument8=>'Y'backwardmode
);

COMMIT;

DBMS_OUTPUT.PUT_LINE('GLImportSubmitted.RequestId:'||l_conc_id);

EXCEPTION
WHENOTHERSTHEN

DBMS_OUTPUT.PUT_LINE('ErrorwhilesubmittingtheGLImportProgram.'
DBMS_OUTPUT.PUT_LINE('Error:'||SQLCODE||''||SUBSTR(SQLERRM,1,200));

END;

Hope this helps. Looking forward to your comments /feedback / suggestions. If you have any questions, let me know in the
comments section.

http://www.quest4apps.com/gljournalimportformultiplejournalsources/ 2/2

You might also like