The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT pap.parameter_value
FROM pay_action_parameters pap
WHERE pap.parameter_name = p_parameter_name;
select pap.accrual_plan_id accrual_plan_id,
pap.accrual_plan_name accrual_plan_name,
pap.co_formula_id co_formula_id,
pap.accrual_plan_element_type_id accrual_plan_element_type_id,
pap.co_input_value_id co_input_value_id,
pap.residual_input_value_id residual_input_value_id,
pap.co_date_input_value_id co_date_input_value_id,
pap.co_exp_date_input_value_id co_exp_date_input_value_id,
pap.residual_date_input_value_id residual_date_input_value_id,
piv1.element_type_id co_element_type_id,
piv2.element_type_id residual_element_type_id
from pay_accrual_plans pap,
pay_input_values_f piv1,
pay_input_values_f piv2
where (pap.accrual_plan_id = nvl(p_plan_id, -1) OR
pap.accrual_category like p_category)
and pap.business_group_id = p_business_group_id
and piv1.input_value_id = pap.CO_INPUT_VALUE_ID
and P_date between piv1.effective_start_date and
piv1.effective_end_date
and piv2.input_value_id = pap.RESIDUAL_INPUT_VALUE_ID
and P_date between piv2.effective_start_date and
piv2.effective_end_date;
select hoi.org_information9
from hr_all_organization_units org
, hr_organization_information hoi
where hoi.organization_id = org.business_group_id
and hoi.org_information_context = 'Business Group Information'
and org.business_group_id = p_bg_id;
select effective_date into l_session_date
from fnd_sessions
where session_id = userenv('sessionid');
select sysdate into l_session_date
from dual;
select distinct pee.assignment_id assignment_id, asg.assignment_number
from pay_element_entries_f pee,
pay_element_links_f pel,
per_all_assignments_f asg
where pee.element_type_id = p_plan_ele_type_id
and pee.element_type_id = pel.element_type_id
and pee.element_link_id = pel.element_link_id
and pee.assignment_id = asg.assignment_id
and asg.period_of_service_id is not null
and (p_accrual_term = 'PTO_CURRENT' or
(p_accrual_term = 'PTO_PREVIOUS' and
asg.effective_start_date < p_calculation_date));
select pee.element_entry_id
from pay_element_entries_f pee,
pay_element_entry_values_f pev
where pee.assignment_id = p_assignment_id
and pee.element_link_id = p_ele_link_id
and pee.element_entry_id = pev.element_entry_id
and pev.input_value_id = p_date_input_value_id
and p_effective_date between pee.effective_start_date
and pee.effective_end_date;
select ptp.start_date,
ptp.end_date
from per_time_periods ptp
where ptp.payroll_id = p_payroll_id
and p_effective_date between ptp.start_date
and ptp.end_date;
select min(asg.effective_start_date)
from per_all_assignments_f asg
where asg.assignment_id = p_assignment_id
and asg.period_of_service_id is not null;
select max(asg.effective_end_date)
from per_all_assignments_f asg
where asg.assignment_id = p_assignment_id
and asg.period_of_service_id is not null;
select asg.payroll_id
from per_all_assignments_f asg
where asg.assignment_id = p_assignment_id
and asg.period_of_service_id is not null
and asg.payroll_id is not null
and ((p_effective_date between
asg.effective_start_date and asg.effective_end_date)
or (asg.effective_end_date < p_effective_date
and asg.effective_end_date =
(select max(asg2.effective_end_date)
from per_all_assignments_f asg2
where asg2.assignment_id = asg.assignment_id
and asg2.period_of_service_id is not null
and asg2.payroll_id is not null))
or (p_accrual_term = 'CURRENT'
and asg.effective_start_date > p_effective_date
and asg.effective_start_date =
(select min(asg3.effective_start_date)
from per_all_assignments_f asg3
where asg3.assignment_id = asg.assignment_id
and asg3.period_of_service_id is not null
and asg3.payroll_id is not null)));
hr_entry_api.insert_element_entry(
p_effective_start_date => l_start_date,
p_effective_end_date => l_end_date,
p_element_entry_id => l_new_ee_id,
p_assignment_id => p_assignment_id,
p_element_link_id => l_co_link_id,
p_creator_type => 'F',
p_entry_type => 'E',
p_num_entry_values => 3,
p_input_value_id_tbl => inp_value_id_tbl,
p_entry_value_tbl => scr_valuetbl);
hr_entry_api.update_element_entry(
p_dt_update_mode => 'CORRECTION',
p_session_date => l_start_date,
p_element_entry_id => l_co_ele_entry_id,
p_num_entry_values => 3,
p_input_value_id_tbl => inp_value_id_tbl,
p_entry_value_tbl => scr_valuetbl);
hr_entry_api.insert_element_entry(
p_effective_start_date => l_start_date,
p_effective_end_date => l_end_date,
p_element_entry_id => l_new_ee_id,
p_assignment_id => p_assignment_id,
p_element_link_id => l_res_link_id,
p_creator_type => 'F',
p_entry_type => 'E',
p_num_entry_values => 2,
p_input_value_id_tbl => inp_value_id_tbl,
p_entry_value_tbl => scr_valuetbl);
hr_entry_api.update_element_entry(
p_dt_update_mode => 'CORRECTION',
p_session_date => l_start_date,
p_element_entry_id => l_res_ele_entry_id,
p_num_entry_values => 2,
p_input_value_id_tbl => inp_value_id_tbl,
p_entry_value_tbl => scr_valuetbl);