The following lines contain the word 'select', 'insert', 'update' or 'delete':
select null
from ben_prtl_mo_rt_prtn_val_f ppv
where ppv.PRORATE_BY_DAY_TO_MON_FLAG = 'Y'
and ppv.acty_base_rt_id = p_acty_base_rt_id
and p_effective_date between ppv.effective_start_date
and ppv.effective_end_date;
select null
from ben_prtl_mo_rt_prtn_val_f ppv
where ppv.PRORATE_BY_DAY_TO_MON_FLAG = 'Y'
and ppv.acty_base_rt_id = p_acty_base_rt_id
and ppv.prtl_mo_rt_prtn_val_id <> p_prtl_mo_rt_prtn_val_id
and p_effective_date between ppv.effective_start_date
and ppv.effective_end_date;
if p_mode = 'Insert' then
open c1;
elsif p_mode = 'Update' then
--
open c2;
select null
from ff_formulas_f ff
,per_business_groups pbg
where ff.formula_id = p_prtl_mo_prortn_rl
and ff.formula_type_id = -528
and pbg.business_group_id = p_business_group_id
and nvl(ff.business_group_id, p_business_group_id) =
p_business_group_id
and nvl(ff.legislation_code, pbg.legislation_code) =
pbg.legislation_code
and p_effective_date
between ff.effective_start_date
and ff.effective_end_date;
select null
from ff_formulas_f ff
where ff.formula_id = p_rndg_rl
and p_effective_date
between ff.effective_start_date
and ff.effective_end_date;
select 'Y'
from ben_prtl_mo_rt_prtn_val_f
Where prtl_mo_rt_prtn_val_id <> nvl(p_prtl_mo_rt_prtn_val_id,-1)
and (acty_base_rt_id = p_acty_base_rt_id or
actl_prem_id = p_actl_prem_id) -- Bug 4440097
and prorate_by_day_to_mon_flag = 'Y'
--Bug 6242951
/* and p_validation_start_date <= effective_end_date
and p_validation_end_date >= effective_start_date
*/
and not ((p_validation_end_date < effective_start_date)
or (p_validation_start_date > effective_end_date))
--Bug 6242951
and business_group_id = p_business_group_id;
cursor c1 is select from_dy_mo_num, to_dy_mo_num
from ben_prtl_mo_rt_prtn_val_f
Where prtl_mo_rt_prtn_val_id <> nvl(p_prtl_mo_rt_prtn_val_id,-1)
and acty_base_rt_id = p_acty_base_rt_id
and strt_r_stp_cvg_cd = p_strt_r_stp_cvg_cd
and num_days_month = p_num_days_month -- Bug No 4366086
-- and p_effective_date between effective_start_date
-- and effective_end_date
and p_validation_start_date <= effective_end_date
and p_validation_end_date >= effective_start_date
and business_group_id = p_business_group_id;
cursor c2 is select strt_r_stp_cvg_cd
from ben_prtl_mo_rt_prtn_val_f
Where prtl_mo_rt_prtn_val_id <> nvl(p_prtl_mo_rt_prtn_val_id,-1)
and acty_base_rt_id = p_acty_base_rt_id
and num_days_month = p_num_days_month -- Bug No 4366086
-- and p_effective_date between effective_start_date
-- and effective_end_date
and p_validation_start_date <= effective_end_date
and p_validation_end_date >= effective_start_date
and business_group_id = p_business_group_id;
fnd_message.set_name('BEN','BEN_92306_MAY_NOT_SELECT_ETHR');
Procedure dt_update_validate
(p_actl_prem_id in number default hr_api.g_number,
p_cvg_amt_calc_mthd_id in number default hr_api.g_number,
p_acty_base_rt_id in number default hr_api.g_number,
p_datetrack_mode in varchar2,
p_validation_start_date in date,
p_validation_end_date in date) Is
--
l_proc varchar2(72) := g_package||'dt_update_validate';
End dt_update_validate;
Procedure dt_delete_validate
(p_prtl_mo_rt_prtn_val_id in number,
p_datetrack_mode in varchar2,
p_validation_start_date in date,
p_validation_end_date in date) Is
--
l_proc varchar2(72) := g_package||'dt_delete_validate';
If (p_datetrack_mode = 'DELETE' or
p_datetrack_mode = 'ZAP') then
--
--
-- Ensure the arguments are not null
--
hr_api.mandatory_arg_error
(p_api_name => l_proc,
p_argument => 'validation_start_date',
p_argument_value => p_validation_start_date);
End dt_delete_validate;
Procedure insert_validate
(p_rec in ben_ppv_shd.g_rec_type,
p_effective_date in date,
p_datetrack_mode in varchar2,
p_validation_start_date in date,
p_validation_end_date in date) is
--
l_proc varchar2(72) := g_package||'insert_validate';
p_mode => 'Insert');
End insert_validate;
Procedure update_validate
(p_rec in ben_ppv_shd.g_rec_type,
p_effective_date in date,
p_datetrack_mode in varchar2,
p_validation_start_date in date,
p_validation_end_date in date) is
--
l_proc varchar2(72) := g_package||'update_validate';
p_mode => 'Update',
p_prtl_mo_rt_prtn_val_id => p_rec.prtl_mo_rt_prtn_val_id);
dt_update_validate
(p_actl_prem_id => p_rec.actl_prem_id,
p_cvg_amt_calc_mthd_id => p_rec.cvg_amt_calc_mthd_id,
p_acty_base_rt_id => p_rec.acty_base_rt_id,
p_datetrack_mode => p_datetrack_mode,
p_validation_start_date => p_validation_start_date,
p_validation_end_date => p_validation_end_date);
End update_validate;
Procedure delete_validate
(p_rec in ben_ppv_shd.g_rec_type,
p_effective_date in date,
p_datetrack_mode in varchar2,
p_validation_start_date in date,
p_validation_end_date in date) is
--
l_proc varchar2(72) := g_package||'delete_validate';
dt_delete_validate
(p_datetrack_mode => p_datetrack_mode,
p_validation_start_date => p_validation_start_date,
p_validation_end_date => p_validation_end_date,
p_prtl_mo_rt_prtn_val_id => p_rec.prtl_mo_rt_prtn_val_id);
End delete_validate;
select a.legislation_code
from per_business_groups a,
ben_prtl_mo_rt_prtn_val_f b
where b.prtl_mo_rt_prtn_val_id = p_prtl_mo_rt_prtn_val_id
and a.business_group_id = b.business_group_id;