The following lines contain the word 'select', 'insert', 'update' or 'delete':
PROCEDURE process_updates (
itemtype IN VARCHAR2,
itemkey IN VARCHAR2,
actid IN NUMBER,
funcmode IN VARCHAR2,
result OUT NOCOPY VARCHAR2) IS
l_value varchar2(2000);
QA_RES_UPDATE_FAILED exception;
do_update BOOLEAN := FALSE;
SELECT qpcao.token_name, qpcao.char_id
FROM qa_plan_char_action_outputs qpcao
WHERE qpcao.plan_char_action_id = c_pca_id
AND qpcao.token_name like 'X_%';
SELECT qr.txn_header_id
FROM qa_results qr
WHERE qr.plan_id = l_plan_id
AND qr.collection_id = l_collection_id
AND qr.occurrence = l_occurrence;
/* insert into ilam1 values ('Got here... '||itemtype||'-'||itemkey||'-'||actid||'-'||funcmode);
--insert into ilam1 values ('Before Loop'); commit;
do_update := TRUE;
if (do_update) THEN
qa_results_pub.update_row(
p_api_version => 1.0,
p_init_msg_list => fnd_api.g_true,
p_commit => fnd_api.g_true,
p_plan_id => l_plan_id,
p_org_id => l_org_id,
p_enabled_flag => 2,
p_collection_id => l_collection_id,
p_occurrence => l_occurrence,
x_row_elements => elements,
x_msg_count => msg_count,
x_msg_data => msg_data,
x_error_array => error_array,
x_message_array => message_array,
x_return_status => return_status,
x_action_result => action_result);
qa_skiplot_utility.insert_error_log
(p_module_name => 'qa_results_wf_pkg.process_updates',
p_error_message => itemtype|| '-' || itemkey
|| ' *** '
|| 'char_id: '||error_array(i).element_id
|| ' Error: ' || error_array(i).error_code);
raise QA_RES_UPDATE_FAILED;
--insert into ilam1 values ('Update has been called');
QA_PARENT_CHILD_PKG.insert_history_auto_rec(
l_plan_id,
l_txnheader_id,
1, 4);
END IF; -- end if do_update check
wf_core.context('qa_results_wf_pkg', 'process_updates',
itemtype, itemkey, to_char(actid), funcmode);
END process_updates;
select template_plan_id
from qa_plans
where plan_id = p_plan_id;