The following lines contain the word 'select', 'insert', 'update' or 'delete':
procedure update_TEMPLATE_ATTRIBUTE
(p_validate in boolean default false
,p_required_flag in varchar2 default hr_api.g_varchar2
,p_view_flag in varchar2 default hr_api.g_varchar2
,p_edit_flag in varchar2 default hr_api.g_varchar2
,p_template_attribute_id in number
,p_attribute_id in number default hr_api.g_number
,p_template_id in number default hr_api.g_number
,p_object_version_number in out nocopy number
,p_effective_date in date
) is
--
-- Declare cursors and local variables
--
l_proc varchar2(72) := g_package||'update_TEMPLATE_ATTRIBUTE';
savepoint update_TEMPLATE_ATTRIBUTES;
pqh_TEMPLATE_ATTRIBUTES_bk2.update_TEMPLATE_ATTRIBUTE_b
(
p_required_flag => p_required_flag
,p_view_flag => p_view_flag
,p_edit_flag => p_edit_flag
,p_template_attribute_id => p_template_attribute_id
,p_attribute_id => p_attribute_id
,p_template_id => p_template_id
,p_object_version_number => p_object_version_number
,p_effective_date => trunc(p_effective_date)
);
(p_module_name => 'UPDATE_TEMPLATE_ATTRIBUTE'
,p_hook_type => 'BP'
);
pqh_TEMPLATE_ATTRIBUTES_bk2.update_TEMPLATE_ATTRIBUTE_a
(
p_required_flag => p_required_flag
,p_view_flag => p_view_flag
,p_edit_flag => p_edit_flag
,p_template_attribute_id => p_template_attribute_id
,p_attribute_id => p_attribute_id
,p_template_id => p_template_id
,p_object_version_number => l_object_version_number
,p_effective_date => trunc(p_effective_date)
);
(p_module_name => 'UPDATE_TEMPLATE_ATTRIBUTE'
,p_hook_type => 'AP'
);
ROLLBACK TO update_TEMPLATE_ATTRIBUTES;
ROLLBACK TO update_TEMPLATE_ATTRIBUTES;
end update_TEMPLATE_ATTRIBUTE;
procedure delete_TEMPLATE_ATTRIBUTE
(p_validate in boolean default false
,p_template_attribute_id in number
,p_object_version_number in number
,p_effective_date in date
) is
--
-- Declare cursors and local variables
--
l_proc varchar2(72) := g_package||'delete_TEMPLATE_ATTRIBUTE';
savepoint delete_TEMPLATE_ATTRIBUTES;
pqh_TEMPLATE_ATTRIBUTES_bk3.delete_TEMPLATE_ATTRIBUTE_b
(
p_template_attribute_id => p_template_attribute_id
,p_object_version_number => p_object_version_number
,p_effective_date => trunc(p_effective_date)
);
(p_module_name => 'DELETE_TEMPLATE_ATTRIBUTE'
,p_hook_type => 'BP'
);
pqh_TEMPLATE_ATTRIBUTES_bk3.delete_TEMPLATE_ATTRIBUTE_a
(
p_template_attribute_id => p_template_attribute_id
,p_object_version_number => l_object_version_number
,p_effective_date => trunc(p_effective_date)
);
(p_module_name => 'DELETE_TEMPLATE_ATTRIBUTE'
,p_hook_type => 'AP'
);
ROLLBACK TO delete_TEMPLATE_ATTRIBUTES;
ROLLBACK TO delete_TEMPLATE_ATTRIBUTES;
end delete_TEMPLATE_ATTRIBUTE;
procedure create_update_copied_attribute
(
p_copied_attributes in pqh_prvcalc.t_attid_priv,
p_template_id in number
) is
--
Cursor csr_tem_attr(p_attribute_id in number) is
Select template_attribute_id,object_version_number
From pqh_template_attributes
Where template_id = p_template_id
and attribute_id = p_attribute_id
FOR UPDATE ;
cursor c_select_flag(p_attribute_id number, p_template_id number) is
select 'x'
from pqh_attributes att, pqh_txn_category_attributes tct, pqh_templates tem
where
att.attribute_id = p_attribute_id
and att.attribute_id = tct.attribute_id
and tem.template_id = p_template_id
and tct.transaction_category_id = tem.transaction_category_id
and nvl(tct.select_flag,'N')='Y';
l_proc varchar2(72) := g_package||'create_update_copied_attribute';
open c_select_flag(p_copied_attributes(cnt).attribute_id, p_template_id);
fetch c_select_flag into l_dummy;
if c_select_flag%found then
--
If p_copied_attributes(cnt).mode_flag = 'E' then
l_view_flag := 'Y';
pqh_TEMPLATE_ATTRIBUTES_api.update_TEMPLATE_ATTRIBUTE
(p_validate => false
,p_required_flag => p_copied_attributes(cnt).reqd_flag
,p_view_flag => l_view_flag
,p_edit_flag => l_edit_flag
,p_template_attribute_id => l_template_attribute_id
,p_attribute_id => p_copied_attributes(cnt).attribute_id
,p_template_id => p_template_id
,p_object_version_number => l_ovn
,p_effective_date => sysdate);
close c_select_flag;
end create_update_copied_attribute;