The following lines contain the word 'select', 'insert', 'update' or 'delete':
PROCEDURE delete_queue_msg (p_api_version_number IN NUMBER,
p_init_msg_list IN VARCHAR2 := NULL,
p_commit IN VARCHAR2 := NULL,
p_message_id in number,
p_reason_id in number,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2) IS
l_api_name varchar2(30):='delete_queue_msg';
SAVEPOINT delete_queue_msg;
select * into l_post_mdts from iem_rt_proc_emails where message_id=p_message_id for update;
select resource_id into l_spv_resource_id from jtf_rs_resource_extns where user_id=l_current_user;
--l_interaction_rec.outcome_id := 14; -- EMAIL DELETED
select wu.outcome_id, wu.result_id, wu.reason_id into
l_interaction_rec.outcome_id, l_interaction_rec.result_id, l_interaction_rec.reason_id
from jtf_ih_action_action_items aa, jtf_ih_wrap_ups wu
where aa.action_id = 31 and aa.action_item_id = 45
and aa.default_wrap_id = wu.wrap_id;
select wu.outcome_id, wu.result_id into
l_interaction_rec.outcome_id, l_interaction_rec.result_id
from jtf_ih_action_action_items aa, jtf_ih_wrap_ups wu
where aa.action_id = 31 and aa.action_item_id = 45
and aa.default_wrap_id = wu.wrap_id;
JTF_IH_PUB.Update_Interaction( p_api_version => 1.0,
p_resp_appl_id => TO_NUMBER(FND_PROFILE.VALUE('RESP_APPL_ID')),
p_resp_id => TO_NUMBER(FND_PROFILE.VALUE('RESP_ID')),
p_user_id => nvl(TO_NUMBER(FND_PROFILE.VALUE('USER_ID')),-1),
p_login_id =>TO_NUMBER(FND_PROFILE.VALUE('LOGIN_ID')),
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data,
p_interaction_rec => l_interaction_rec
);
l_activity_rec.action_id := 31; -- Deleted an inbound email
/*select name into l_class_name from iem_route_classifications where route_classification_id=l_post_mdts.rt_classification_id;
p_tofolder => 'Deleted',
p_fromfolder => l_class_name,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data);
-- Delete from queue and close media items
IEM_MAILITEM_PUB.ResolvedMessage (p_api_version_number => 1.0,
p_init_msg_list => FND_API.G_FALSE,
p_commit => FND_API.G_FALSE,
p_message_id => l_post_mdts.message_id,
p_action_flag => 'D',
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data);
ROLLBACK TO delete_queue_msg;
ROLLBACK TO delete_queue_msg;
ROLLBACK TO delete_queue_msg;
ROLLBACK TO delete_queue_msg;
END delete_queue_msg;
PROCEDURE delete_queue_msg_batch (p_api_version_number IN NUMBER,
p_init_msg_list IN VARCHAR2 := NULL,
p_commit IN VARCHAR2 := NULL,
p_message_ids_tbl IN jtf_varchar2_Table_100,
p_reason_id IN NUMBER,
x_moved_message_count OUT NOCOPY NUMBER,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2) IS
l_api_name varchar2(30):='delete_queue_msg_batch';
SAVEPOINT delete_queue_msg_batch;
iem_spv_actions_pvt.delete_queue_msg (p_api_version_number => 1.0,
p_init_msg_list => FND_API.G_FALSE,
p_commit => FND_API.G_FALSE,
p_message_id => p_message_ids_tbl(i),
p_reason_id => p_reason_id,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data) ;
ROLLBACK TO delete_queue_msg;
ROLLBACK TO delete_queue_msg;
ROLLBACK TO delete_queue_msg;
END delete_queue_msg_batch;