The following lines contain the word 'select', 'insert', 'update' or 'delete':
select fcp.concurrent_program_name, a.application_short_name
into prog_name, appl_name
from fnd_concurrent_requests fcr,
fnd_concurrent_programs fcp, fnd_application a
where fcr.request_id = reqid
and fcp.concurrent_program_id = fcr.concurrent_program_id
and fcp.application_id = fcr.program_application_id
and fcp.application_id = a.application_id
and rownum = 1;
procedure update_actions_table(reqid in number, procid in number,
success out NOCOPY varchar2) is
cnt number;
select count(*)
into cnt
from fnd_conc_pp_actions
where concurrent_request_id = reqid
and processor_id is not null;
update fnd_conc_pp_actions
set processor_id = procid
where concurrent_request_id = reqid;
procedure update_req_pp_status(reqid in number, status in varchar2) is
begin
if status = PP_PENDING then
update fnd_concurrent_requests
set pp_start_date = sysdate, post_request_status = status
where request_id = reqid;
update fnd_concurrent_requests
set pp_end_date = sysdate, post_request_status = status
where request_id = reqid;
procedure update_pp_action(reqid in number, cpid in number) is
pragma autonomous_transaction;
update fnd_conc_pp_actions
set processor_id = cpid
where concurrent_request_id = reqid;
subscriber := fnd_cp_opp_ipc.select_random_subscriber;
select fcp.node_name
into node_name
from fnd_concurrent_processes fcp
where fcp.concurrent_process_id = subscriber
and fcp.process_status_code in ('A', 'Z');
procedure select_postprocessor(opp_name out NOCOPY varchar2,
errcode out NOCOPY number,
requestid in number) is
node_name varchar2(30);
select fcr.outfile_node_name
into node_name
from fnd_concurrent_requests fcr
where request_id = requestid;
select count(*)
into init_count
from fnd_concurrent_processes fcp,
fnd_concurrent_queues fcq,
fnd_cp_services fcs
where fcs.service_handle = 'FNDOPP'
and fcs.service_id = fcq.manager_type
and fcq.concurrent_queue_id = fcp.concurrent_queue_id
and fcq.application_id = fcp.queue_application_id
and fcp.process_status_code = 'Z';
update_req_pp_status(reqid, PP_PENDING);
select fcr.controlling_manager
into cpid
from fnd_concurrent_requests fcr
where request_id = reqid;
update_req_pp_status(reqid, PP_COMPLETE);
update_req_pp_status(reqid, PP_ERROR);
select processor_id
into pp_id
from fnd_conc_pp_actions
where concurrent_request_id = reqid
and action_type = 6
and sequence = 1;
-- update the pp_actions table so the post-processor will not process this req
update_pp_action(reqid, cpid);
update_req_pp_status(reqid, PP_ERROR);
update_req_pp_status(reqid, PP_COMPLETE);
update_req_pp_status(reqid, PP_ERROR);
update_req_pp_status(reqid, PP_TIMEOUT);
update_req_pp_status(reqid, PP_ERROR);
select fcp.concurrent_program_name, a.application_short_name, argument1
into prog_name, appl_name, parent_req_id
from fnd_concurrent_requests fcr,
fnd_concurrent_programs fcp, fnd_application a
where fcr.request_id = reqid
and fcp.concurrent_program_id = fcr.concurrent_program_id
and fcp.application_id = fcr.program_application_id
and fcp.application_id = a.application_id
and rownum = 1;
select count(1) into action_type from fnd_conc_pp_actions
where concurrent_request_id=reqid and action_type=6;
select count(1) into output_exists from fnd_conc_req_outputs
where concurrent_request_id = decode(action_type, 1, reqid, to_number(parent_req_id))
and file_size>0;
select count(1) into output_exists from fnd_conc_req_outputs
where concurrent_request_id = reqid
and file_size>0;
select count(*)
into cnt
from fnd_conc_pp_actions
where action_type = 6
and concurrent_request_id = cur_reqid;
select fcro.file_name, fcro.file_node_name, fcr.output_file_type
into outfile, outnode, outtype
from fnd_conc_req_outputs fcro, fnd_concurrent_requests fcr
where fcro.concurrent_request_id = prev_reqid
and fcro.concurrent_request_id = fcr.request_id;
select outfile_name, outfile_node_name, output_file_type
into outfile, outnode, outtype
from fnd_concurrent_requests
where request_id = prev_reqid;
update fnd_concurrent_requests
set outfile_name = outfile,
outfile_node_name = outnode,
output_file_type = outtype
where request_id = cur_reqid;