The following lines contain the word 'select', 'insert', 'update' or 'delete':
select legislation_code
from per_business_groups_perf
where business_group_id = p_business_group_id;
select
pbt.balance_name balance_name,
pbd.dimension_name dimension_name,
pdb.defined_balance_id defined_balance_id,
fue.user_entity_id user_entity_id
from ff_user_entities fue,
pay_balance_dimensions pbd,
pay_defined_balances pdb,
pay_balance_types pbt
where decode(pbt.business_group_id, null, g_business_group_id, pbt.business_group_id) = g_business_group_id
and decode(pbt.legislation_code, null, g_legislation_code, pbt.legislation_code) = g_legislation_code
and pdb.balance_type_id = pbt.balance_type_id
and pbd.balance_dimension_id = pdb.balance_dimension_id
and decode(pbd.business_group_id, null, g_business_group_id, pbd.business_group_id) = g_business_group_id
and decode(pbd.legislation_code, null, g_legislation_code, pbd.legislation_code) = g_legislation_code
and fue.user_entity_name = 'A_'||pbt.balance_name||pbd.dimension_name
and fue.user_entity_name like 'A%'
and fue.creator_type = 'X';
g_pre_get_balance_value.balance_name.delete;
g_pre_get_balance_value.dimension_name.delete;
g_pre_get_balance_value.defined_balance_id.delete;
g_pre_get_balance_value.user_entity_id.delete;
select
fue.user_entity_id user_entity_id,
fue.user_entity_name user_entity_name,
xfue.user_entity_id xuser_entity_id,
xfue.user_entity_name xuser_entity_name,
fdi.user_name user_name
from ff_database_items fdi,
ff_user_entities xfue,
ff_user_entities fue
where nvl(fue.business_group_id,g_business_group_id) = g_business_group_id
and nvl(fue.legislation_code,g_legislation_code) = g_legislation_code
and xfue.user_entity_name = 'A_'||fue.user_entity_name
and xfue.user_entity_name like 'A_%'
and nvl(xfue.business_group_id,g_business_group_id) = g_business_group_id
and nvl(xfue.legislation_code,g_legislation_code) = g_legislation_code
and fdi.user_entity_id = fue.user_entity_id
and xfue.creator_type = 'X';
g_pre_get_dbitem_value.user_entity_id.delete;
g_pre_get_dbitem_value.user_entity_name.delete;
g_pre_get_dbitem_value.xuser_entity_id.delete;
g_pre_get_dbitem_value.xuser_entity_name.delete;
g_pre_get_dbitem_value.user_name.delete;
select pdb.defined_balance_id defined_balance_id
from pay_balance_dimensions pbd,
pay_defined_balances pdb,
pay_balance_types pbt
where pbt.balance_name = p_balance_name
and nvl(pbt.business_group_id, g_business_group_id) = g_business_group_id
and nvl(pbt.legislation_code, g_legislation_code) = g_legislation_code
and pdb.balance_type_id = pbt.balance_type_id
and pbd.balance_dimension_id = pdb.balance_dimension_id
and pbd.dimension_name = p_dimension_name
and nvl(pbd.business_group_id, g_business_group_id) = g_business_group_id
and nvl(pbd.legislation_code, g_legislation_code) = g_legislation_code;
g_pre_get_balance_value.balance_name.delete;
g_pre_get_balance_value.dimension_name.delete;
g_pre_get_balance_value.defined_balance_id.delete;
g_pre_get_balance_value.user_entity_id.delete;
select fue.user_entity_id user_entity_id
from ff_user_entities fue,
pay_balance_dimensions pbd,
pay_balance_types pbt,
pay_defined_balances pdb
where pdb.defined_balance_id = p_defined_balance_id
and pbt.balance_type_id = pdb.balance_type_id
and pbd.balance_dimension_id = pdb.balance_dimension_id
/* If creator_id is same as source user_entity_id, it might be simple. */
and fue.user_entity_name = 'A_'||pbt.balance_name||pbd.dimension_name
and fue.creator_type = 'X';
g_pre_get_balance_value.balance_name.delete;
g_pre_get_balance_value.dimension_name.delete;
g_pre_get_balance_value.defined_balance_id.delete;
g_pre_get_balance_value.user_entity_id.delete;
select fue.user_entity_id user_entity_id
from ff_user_entities fue,
ff_database_items fdi
where fdi.user_name = p_user_name
and fue.user_entity_id = fdi.user_entity_id
and nvl(fue.business_group_id,g_business_group_id) = g_business_group_id
and nvl(fue.legislation_code,g_legislation_code) = g_legislation_code;
g_pre_get_dbitem_value.user_entity_id.delete;
g_pre_get_dbitem_value.user_entity_name.delete;
g_pre_get_dbitem_value.xuser_entity_id.delete;
g_pre_get_dbitem_value.xuser_entity_name.delete;
g_pre_get_dbitem_value.user_name.delete;
select xfue.user_entity_id xuser_entity_id
from ff_user_entities xfue,
ff_user_entities fue
where fue.user_entity_id = p_user_entity_id
and xfue.user_entity_name = 'A_'||fue.user_entity_name
and nvl(xfue.business_group_id,g_business_group_id) = g_business_group_id
and nvl(xfue.legislation_code,g_legislation_code) = g_legislation_code
and xfue.creator_type = 'X';
g_pre_get_dbitem_value.user_entity_id.delete;
g_pre_get_dbitem_value.user_entity_name.delete;
g_pre_get_dbitem_value.xuser_entity_id.delete;
g_pre_get_dbitem_value.xuser_entity_name.delete;
g_pre_get_dbitem_value.user_name.delete;
select run_type_id
from pay_run_types_f
where run_type_name = p_type
and g_effective_date
between effective_start_date and effective_end_date
and nvl(business_group_id, g_business_group_id) = g_business_group_id
and nvl(legislation_code, g_legislation_code) = g_legislation_code;
select assignment_action_id
from pay_assignment_actions paa
where paa.assignment_id = p_assignment_id
and paa.run_type_id = l_run_type_id
and paa.action_sequence =
(
select max(paa2.action_sequence)
from pay_payroll_actions ppa2,
pay_assignment_actions paa2
where paa2.assignment_id = p_assignment_id
and paa2.run_type_id = l_run_type_id
and paa2.action_status in ('C', 'S') -- Bug 4442484: Include 'S'kipped assacts
and ppa2.payroll_action_id = paa2.payroll_action_id
and ppa2.effective_date
between p_effective_date_from and p_effective_date_to
and ppa2.action_type in ('R','Q','I','V','B')
) ;
select paa.assignment_action_id
from pay_payroll_actions ppa,
pay_assignment_actions paa
where paa.assignment_id = p_assignment_id
and paa.run_type_id is null
and paa.action_status in ('C', 'S') -- Bug 4442484: Include 'S'kipped assacts
and ppa.payroll_action_id = paa.payroll_action_id
and ppa.effective_date
between p_effective_date_from and p_effective_date_to
and ppa.action_type = 'B'
and ppa.report_type = decode(substr(lpad(p_type,4),2,4),'HIA','HIA','YEA')
and ppa.report_category = decode(substr(lpad(p_type,4),1,1),'I','I','R','R','N')
and ppa.report_qualifier = 'KR'
and not exists(
select null
from pay_payroll_actions ppa2,
pay_assignment_actions paa2
where paa2.assignment_id = paa.assignment_id
and paa2.run_type_id is null
and paa2.action_status in ('C', 'S') -- Bug 4442484: Include 'S'kipped assacts
and ppa2.payroll_action_id = paa2.payroll_action_id
and ppa2.effective_date
between p_effective_date_from and p_effective_date_to
and ppa2.action_type = 'B'
and ppa2.report_type = decode(substr(lpad(p_type,4),2,4),'HIA','HIA','YEA')
and ppa2.report_category = decode(substr(lpad(p_type,4),1,1),'I','I','R','R','N')
and ppa2.report_qualifier = 'KR'
and paa2.action_sequence > paa.action_sequence);
select effective_date
into g_effective_date
from fnd_sessions
where session_id = userenv('sessionid');
select
nvl(sum(fnd_number.canonical_to_number(prrv.result_value) * pbf.scale),0) value
from pay_balance_feeds_f pbf,
pay_run_result_values prrv,
pay_run_results prr,
pay_payroll_actions ppa,
pay_assignment_actions paa
where paa.assignment_action_id = p_assignment_action_id
and ppa.payroll_action_id = paa.payroll_action_id
and prr.assignment_action_id = paa.assignment_action_id
and prr.status in ('P','PA')
and prrv.run_result_id = prr.run_result_id
and nvl(prrv.result_value,'0') <> '0'
and pbf.input_value_id = prrv.input_value_id
and pbf.balance_type_id = p_balance_type_id
and ppa.effective_date
between pbf.effective_start_date and pbf.effective_end_date;
select fai.user_entity_id,
fai.value
from ff_archive_items fai
where fai.context1 = p_assignment_action_id
and fai.value is not null;
g_archive_item_value_tbl.delete;
select ppa.business_group_id,
paa.assignment_action_id,
nvl(xpaa.assignment_action_id,-1)
from pay_payroll_actions xppa,
pay_assignment_actions xpaa,
pay_action_interlocks pai,
pay_payroll_actions ppa,
pay_assignment_actions paa
where paa.assignment_action_id = p_assignment_action_id
and ppa.payroll_action_id = paa.payroll_action_id
and pai.locked_action_id (+) = paa.assignment_action_id
and xpaa.assignment_action_id (+) = pai.locking_action_id
and xpaa.action_status (+) in ('C', 'S') -- Bug 4442484: Include 'S'kipped assacts
and xppa.payroll_action_id (+) = xpaa.payroll_action_id
and xppa.action_type (+) = 'X';
select ppa.business_group_id,
paa.assignment_action_id
from pay_payroll_actions ppa,
pay_assignment_actions paa
where paa.assignment_action_id = p_assignment_action_id
and ppa.payroll_action_id = paa.payroll_action_id;
select ppa.business_group_id,
paa.assignment_action_id,
nvl(xpaa.assignment_action_id,-1)
from pay_payroll_actions xppa,
pay_assignment_actions xpaa,
pay_action_interlocks pai,
pay_payroll_actions ppa,
pay_assignment_actions paa
where paa.assignment_action_id = p_assignment_action_id
and ppa.payroll_action_id = paa.payroll_action_id
and pai.locked_action_id (+) = paa.assignment_action_id
and xpaa.assignment_action_id (+) = pai.locking_action_id
and xpaa.action_status (+) in ('C', 'S') -- Bug 4442484: Include 'S'kipped assacts
and xppa.payroll_action_id (+) = xpaa.payroll_action_id
and xppa.action_type (+) = 'X';
select ppa.payroll_id payroll_id,
ppa.payroll_action_id payroll_action_id,
paa.assignment_id assignment_id,
ppa.date_earned date_earned,
paa.tax_unit_id tax_unit_id,
fdi.user_name user_name
from ff_database_items fdi,
pay_payroll_actions ppa,
pay_assignment_actions paa
where paa.assignment_action_id = g_assignment_action_id
and ppa.payroll_action_id = paa.payroll_action_id
and fdi.user_entity_id = p_user_entity_id;
select ppa.business_group_id,
paa.assignment_action_id
from pay_payroll_actions ppa,
pay_assignment_actions paa
where paa.assignment_action_id = p_assignment_action_id
and ppa.payroll_action_id = paa.payroll_action_id;
select pet.element_type_id,
piv.input_value_id
from pay_input_values_f piv,
pay_element_types_f pet,
pay_payroll_actions ppa,
pay_assignment_actions paa
where paa.assignment_action_id = p_assignment_action_id
and ppa.payroll_action_id = paa.payroll_action_id
and pet.element_name = p_element_type_name
and nvl(pet.business_group_id, g_business_group_id) = g_business_group_id
and nvl(pet.legislation_code, g_legislation_code) = g_legislation_code
and ppa.effective_date
between pet.effective_start_date and pet.effective_end_date
and piv.element_type_id = pet.element_type_id
and piv.name = p_input_value_name
and ppa.effective_date
between piv.effective_start_date and piv.effective_end_date;
select
fnd_date.canonical_to_date(prrv.result_value) value
from pay_run_result_values prrv,
pay_run_results prr,
pay_payroll_actions ppa,
pay_assignment_actions paa
where paa.assignment_action_id = p_assignment_action_id
and ppa.payroll_action_id = paa.payroll_action_id
and prr.assignment_action_id = paa.assignment_action_id
and prr.status in ('P','PA')
and prr.element_type_id = p_element_type_id
and prrv.run_result_id = prr.run_result_id
and prrv.input_value_id = p_input_value_id;
select pet.element_type_id,
piv.input_value_id
from pay_input_values_f piv,
pay_element_types_f pet,
pay_payroll_actions ppa,
pay_assignment_actions paa
where paa.assignment_action_id = p_assignment_action_id
and ppa.payroll_action_id = paa.payroll_action_id
and pet.element_name = p_element_type_name
and nvl(pet.business_group_id, g_business_group_id) = g_business_group_id
and nvl(pet.legislation_code, g_legislation_code) = g_legislation_code
and ppa.effective_date
between pet.effective_start_date and pet.effective_end_date
and piv.element_type_id = pet.element_type_id
and piv.name = p_input_value_name
and ppa.effective_date
between piv.effective_start_date and piv.effective_end_date;
select
fnd_number.canonical_to_number(prrv.result_value) value
from pay_run_result_values prrv,
pay_run_results prr,
pay_payroll_actions ppa,
pay_assignment_actions paa
where paa.assignment_action_id = p_assignment_action_id
and ppa.payroll_action_id = paa.payroll_action_id
and prr.assignment_action_id = paa.assignment_action_id
and prr.status in ('P','PA')
and prr.element_type_id = p_element_type_id
and prrv.run_result_id = prr.run_result_id
and prrv.input_value_id = p_input_value_id;
select pet.element_type_id,
piv.input_value_id
from pay_input_values_f piv,
pay_element_types_f pet,
pay_payroll_actions ppa,
pay_assignment_actions paa
where paa.assignment_action_id = p_assignment_action_id
and ppa.payroll_action_id = paa.payroll_action_id
and pet.element_name = p_element_type_name
and nvl(pet.business_group_id, g_business_group_id) = g_business_group_id
and nvl(pet.legislation_code, g_legislation_code) = g_legislation_code
and ppa.effective_date
between pet.effective_start_date and pet.effective_end_date
and piv.element_type_id = pet.element_type_id
and piv.name = p_input_value_name
and ppa.effective_date
between piv.effective_start_date and piv.effective_end_date;
select
prrv.result_value value
from pay_run_result_values prrv,
pay_run_results prr,
pay_payroll_actions ppa,
pay_assignment_actions paa
where paa.assignment_action_id = p_assignment_action_id
and ppa.payroll_action_id = paa.payroll_action_id
and prr.assignment_action_id = paa.assignment_action_id
and prr.status in ('P','PA')
and prr.element_type_id = p_element_type_id
and prrv.run_result_id = prr.run_result_id
and prrv.input_value_id = p_input_value_id;
select result_value
from pay_run_result_values
where run_result_id = p_run_result_id
and input_value_id = p_input_value_id ;