The following lines contain the word 'select', 'insert', 'update' or 'delete':
update hr_api_hook_calls
set pre_processor_date = sysdate
, encoded_error = null
, status = 'V'
, object_version_number = object_version_number + 1
where api_hook_call_id = p_api_hook_call_id
and object_version_number = p_object_version_number;
update hr_api_hook_calls
set pre_processor_date = sysdate
, encoded_error = l_encoded_err_text
, status = 'I'
, object_version_number = object_version_number + 1
where api_hook_call_id = p_api_hook_call_id
and object_version_number = p_object_version_number;
add_to_source('-- select c.encoded_error' || c_new_line);
add_to_source('-- select h.encoded_error' || c_new_line);
update hr_api_hooks
set encoded_error = l_encoded_err_text
where api_hook_id = p_api_hook_id;
select api_hook_call_id
, object_version_number
, legislation_code
, call_package
, call_procedure
from hr_api_hook_calls
where legislation_code is not null
and enabled_flag = 'Y'
and api_hook_id = p_api_hook_id
order by legislation_code, sequence;
select ahc.api_hook_call_id
, ahc.object_version_number
, ahc.call_package
, ahc.call_procedure
from hr_api_hook_calls ahc
, fnd_product_installations fpi
where ahc.api_hook_id = p_api_hook_id
and ahc.enabled_flag = 'Y'
and ahc.application_id is not null
and ahc.application_id = fpi.application_id
and ( ( ahc.app_install_status IN ('I', 'S')
and ahc.app_install_status = fpi.status)
or ( ahc.app_install_status = 'I_OR_S'
and fpi.status IN ('I', 'S')))
order by ahc.sequence;
l_dynamic_sql := 'select api_hook_call_id' ||
' , object_version_number' ||
' , call_package' ||
' , call_procedure' ||
' from hr_api_hook_calls' ||
' where legislation_code is null' ||
' and application_id is null' ||
' and enabled_flag = ' || '''' || 'Y' || '''' ||
' and api_hook_id = :p_api_hook_id ' ||
' {sequence_range} ' ||
' order by legislation_code, sequence';
procedure update_disabled_calls
(p_api_hook_id in number
) is
--
-- Cursor to find all the disabled, hook calls for one hook.
--
cursor csr_disabled is
select api_hook_call_id
, object_version_number
from hr_api_hook_calls
where enabled_flag = 'N'
and api_hook_id = p_api_hook_id;
l_proc varchar2(72) := g_package||'update_disabled_calls';
update hr_api_hook_calls
set pre_processor_date = sysdate
, encoded_error = null
, status = 'V'
, object_version_number = object_version_number + 1
where api_hook_call_id = l_disabled.api_hook_call_id
and object_version_number = l_disabled.object_version_number;
end update_disabled_calls;
select 1
from hr_api_hook_calls
where enabled_flag = 'Y'
and legislation_code is null
and application_id is null
and api_hook_id = p_api_hook_id;
select 1
from hr_api_hook_calls
where enabled_flag = 'Y'
and legislation_code is not null
and api_hook_id = p_api_hook_id;
select 1
from hr_api_hook_calls ahc
, fnd_product_installations fpi
where ahc.api_hook_id = p_api_hook_id
and ahc.enabled_flag = 'Y'
and ahc.application_id is not null
and ahc.application_id = fpi.application_id
and ( ( ahc.app_install_status IN ('I', 'S')
and ahc.app_install_status = fpi.status)
or ( ahc.app_install_status = 'I_OR_S'
and fpi.status IN ('I', 'S')));
select 1
from hr_api_hook_calls ahc
, hr_api_hooks ahk_ap
, hr_api_modules amk
, hr_api_hooks ahk_bp
where ahc.enabled_flag = 'Y'
and ahc.legislation_code is not null
and ahc.api_hook_id = ahk_ap.api_hook_id
and ahk_ap.api_hook_type = 'AP'
and ahk_ap.api_module_id = amk.api_module_id
and amk.api_module_id = ahk_bp.api_module_id
and ahk_bp.api_hook_type = 'BP'
and ahk_bp.api_hook_id = p_api_hook_id;
update_disabled_calls
(p_api_hook_id => p_api_hook_id
);
update hr_api_hooks
set encoded_error = null
where api_hook_id = p_api_hook_id;
'-- select h.encoded_error' || c_new_line ||
'-- from hr_api_hooks h' || c_new_line ||
'-- where h.api_hook_id = ' || to_char(p_api_hook_id) ||
';' || c_new_line ||
update hr_api_hooks
set encoded_error = l_encoded_err_text
where api_hook_id = p_api_hook_id;
select ahk.hook_procedure
, ahk.api_hook_type
, ahk.api_hook_id
, ahk.legislation_package
, ahk.legislation_function
, amd.module_name
, amd.data_within_business_group
from hr_api_modules amd
, hr_api_hooks ahk
where amd.api_module_id = ahk.api_module_id
and ahk.hook_package = p_hook_package;
select text
from user_source
where name = p_pkg_name
and type = p_pkg_type
and line = 2;