Since 2010, OraERP is a Oracle Forums, Community of Oracle Professionals including Fusion/Cloud Application Consultants, Enterprise Architects, ERP Cloud, HCM Cloud, CX Cloud and OCI Experts, ERP Experts, Oracle Apps Functional Consultants, Apps DBAs, DBAs, Cloud DBAs, Digital Architect, PaaS Experts, IaaS, OCI Architects, Technical Consultants, Fusion Middleware Experts, SQL, PL/SQL Developers and Project Managers. Welcome to OraERP.com Social Community, a friendly and active community of Oracle Technology Professionals who believe that technology can ‘make the world a better place’. By joining Oracle ERP Community you will have the ability to Post Topics, Receive our Newsletter, subscribe to threads and access many other special features. Registration is Quick and Simple. Get unlimited access to Oracle Tutorials, Articles, eBooks, Tools and Tips .
Thread Rating:
  • 62 Vote(s) - 2.9 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to run GL Journal Import program through PL SQL?
09-08-2014, 03:25 PM, (This post was last modified: 09-08-2014, 04:29 PM by umar79.)
#1
How to run GL Journal Import program through PL SQL?
declare
-- Local variables here
cur_request_id number; v_wait boolean; v_int_run_id number; p_grp_id number;
lc_phase VARCHAR2 (100);
lc_status VARCHAR2 (100);
lc_dev_phase VARCHAR2 (100);
lc_dev_status VARCHAR2 (100);
lc_message VARCHAR2 (100);
begin
-- Test statements here

fnd_file.put_line(fnd_file.log, 'Begin Control intilization');

apps.Gl_Journal_Import_Pkg.Populate_Interface_Control(user_je_source_name => 'Manual', group_id => p_grp_id, set_of_books_id => -1, interface_run_id => v_int_run_id);

update gl_interface_control set group_id = null where interface_run_id = v_int_run_id;
commit;

fnd_file.put_line(fnd_file.log, 'Run ID: ' || to_char(nvl(v_int_run_id,0)));
--27755, 1005, N, , , N, O, Y

cur_request_id := Apps.FND_REQUEST.SUBMIT_REQUEST ( Application => 'SQLGL' -- application short name
, Program => 'GLLEZL' -- program short name
, Description => 'Manual' -- program name
, Start_Time => SysDate -- start date
, Sub_Request => FALSE -- sub-request
, Argument1 => v_int_run_id -- interface run id
, Argument2 => 1005 -- set of books id
, Argument3 => 'N' -- error to suspense flag
, Argument4 => NULL -- from accounting date
, Argument5 => NULL -- to accounting date
, Argument6 => 'N' -- l_summary_flag, -- create summary flag
, Argument7 => 'O' -- import desc flex flag
, Argument8 => 'Y' -- Data security mode flag
);
COMMIT;

fnd_file.put_line(fnd_file.log, 'Request_ID: ' || to_char(cur_request_id));

v_wait := FND_CONCURRENT.WAIT_FOR_REQUEST(cur_request_id,2,60,phase => lc_phase
,status => lc_status
,dev_phase => lc_dev_phase
,dev_status => lc_dev_status
,message => lc_message);

end;
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  SQL Query to get the username in Fusion Applications Zishan Ali 0 8,455 08-06-2015, 06:11 PM
Last Post: Zishan Ali
  Email From Oracle PL/SQL Richard 0 6,872 01-06-2013, 06:32 PM
Last Post: Richard



Users browsing this thread: 1 Guest(s)