The following lines contain the word 'select', 'insert', 'update' or 'delete':
select processor_id, completed
into cpid, complete
from fnd_conc_pp_actions
where concurrent_request_id = reqid
and action_type = 6
and sequence = 1;
-- post-processor has not started yet, update the table with our id
-- so the post-processor will not pick it up.
update fnd_conc_pp_actions
set processor_id = senderid
where concurrent_request_id = reqid;
-- also update the post-processing status of the request
-- this could possibly cause a deadlock if the manager running the request still has the lock
begin
select 1 into dummy from fnd_concurrent_requests where request_id = reqid for update of pp_end_date, post_request_status nowait;
update fnd_concurrent_requests
set pp_end_date = sysdate,
post_request_status = 'E'
where request_id = reqid;
select processor_id, completed
into cpid, complete
from fnd_conc_pp_actions
where concurrent_request_id = reqid
and action_type = 6
and sequence = 1;
-- post-processor has not started yet, update the table with our id
-- so the post-processor will not pick it up.
update fnd_conc_pp_actions
set processor_id = senderid
where concurrent_request_id = reqid;
update fnd_concurrent_requests
set pp_end_date = sysdate,
post_request_status = 'E'
where request_id = reqid;