calling journal import program from plsql procedure [message #306952] |
Mon, 17 March 2008 06:17 |
raju_kamarapu
Messages: 19 Registered: February 2008 Location: KAULAMPUR
|
Junior Member |
|
|
Hi, Please help me to find the solution , how to submit journal import concurrent program from plsql procedure , Follawing i have created one procedure which in subimitted the program,
CREATE OR REPLACE PROCEDURE XXX_IMPORT
AS
l_interface_run_id number;
l_submittedreqid number;
l_set_of_books_id number;
p_summary_journal_entry varchar2(2);
begin
-- SELECT gl_journal_import_s.NEXTVAL
-- INTO l_interface_run_id
-- FROM dual;
l_interface_run_id := 1991;
l_set_of_books_id :=1001;
p_summary_journal_entry :='N';
l_submittedreqid:= fnd_request.submit_request
(
'SQLGL', -- application short name
'GLLEZL', -- program short name
NULL, -- program name
NULL, -- start date
FALSE, -- sub-request
l_interface_run_id, -- interface run id
l_set_of_books_id, -- set of books id
'N', -- error to suspense flag
NULL, -- from accounting date
NULL, -- to accounting date
NVL(p_summary_journal_entry,'N'), -- create summary flag
'N' -- import desc flex flag
);
dbms_output.put_line('request_id ' || l_submittedreqid);
end;
And before running This Program i am Doing insert Values INTO gl_interface_control table like
INSERT INTO gl_interface_control
(
JE_SOURCE_NAME,
STATUS,
INTERFACE_RUN_ID,
GROUP_ID,
SET_OF_BOOKS_ID,
PACKET_ID )
VALUES
(
26,
'S',
gl_journal_import_s.NEXTVAL,
14623,
1001,
'');
Then also its not working.
Please help me.
Thanks in Advance
Raju.K
|
|
|
|
|
Re: calling journal import program from plsql procedure [message #307730 is a reply to message #306952] |
Wed, 19 March 2008 13:45 |
SanthoshKumar_s
Messages: 28 Registered: March 2005 Location: Hyderabad
|
Junior Member |
|
|
Im currently using it and its working fine.
Pass source name and the SOB ID to get group_id and the interface_run_id
gl_journal_import_pkg.populate_interface_control
(user_je_source_name => lv_source_name,
GROUP_ID => lv_group_id,
set_of_books_id => lv_sob_id,
interface_run_id => lv_iface_run_id
);
Note: Make sure you are inserting the group_id generated while populating the GL_INTERFACE table.
Use this to submit the Import Program.
lv_glint_conc_output :=
fnd_request.submit_request (application => v_appl_name,
program => 'GLLEZL', -- "Journal Import Program"
description => NULL,
start_time => SYSDATE,
sub_request => FALSE,
argument1 => TO_CHAR(lv_iface_run_id),
argument2 => lv_sob_id,
argument3 => 'N',
argument4 => TO_CHAR (SYSDATE, 'yyyy/mm/dd' ),
argument5 => NULL,
argument6 => 'N',
argument7 => 'W'
);
|
|
|