The following lines contain the word 'select', 'insert', 'update' or 'delete':
Function delete_plan_for_grade(p_grade_id in number) RETURN varchar2 is
Cursor Pl is
Select PL_Id, Effective_Start_Date, Effective_End_Date, Object_version_number
From Ben_Pl_F
Where MAPPING_TABLE_NAME = 'PER_GRADES'
and MAPPING_TABLE_PK_ID = p_grade_id
and Hr_general.Effective_Date
between Effective_Start_Date and Effective_End_Date;
Select plip_Id, Effective_Start_Date, Effective_End_Date, Object_version_number
From Ben_plip_F
Where Pl_Id = P_Pl_Id
and Hr_general.Effective_Date
between Effective_Start_Date and Effective_End_Date;
l_datetrack_mode := 'DELETE';
ben_Plan_in_Program_api.delete_Plan_in_Program
(p_plip_id => PLip_rec.Plip_Id
,p_effective_start_date => L_Effective_Start_Date
,p_effective_end_date => L_Effective_End_Date
,p_object_version_number => L_plip_Ovn_No
,p_effective_date => Hr_general.Effective_Date
,p_datetrack_mode => l_datetrack_mode);
l_datetrack_mode := 'DELETE';
ben_plan_api.delete_Plan
(p_pl_id => Pl_Rec.Pl_Id
,p_effective_start_date => L_Effective_Start_Date
,p_effective_end_date => L_Effective_End_Date
,p_object_version_number => L_Plan_Ovn_No
,p_effective_date => Hr_general.Effective_Date
,p_datetrack_mode => l_datetrack_mode);
Function delete_std_rt_for_grade_rule(p_rate_type in varchar2 ,
p_grade_or_spinal_point_id in number,
p_grade_rule_id in number,
p_effective_date in date,
p_datetrack_mode in varchar2)
RETURN varchar2 is
l_Business_group_id Ben_Acty_base_Rt_F.business_group_id%TYPE;
select business_group_id
from pay_grade_rules_f
where grade_rule_id =p_grade_rule_id
AND grade_or_spinal_point_id = p_grade_or_spinal_point_id
AND p_effective_date between effective_start_date
and effective_end_date;
Select ACTY_BASE_RT_ID, Effective_Start_Date,
Effective_End_Date, Object_version_number
From Ben_Acty_base_Rt_F
Where PAY_RATE_GRADE_RULE_ID = p_grade_rule_id
and p_effective_date
Between Effective_Start_Date and Effective_End_Date
and business_group_id = l_business_group_id;
Select Acty_Vrbl_Rt_Id,
Object_Version_Number
From Ben_Acty_Vrbl_Rt_F
Where Acty_base_rt_Id = P_Acty_Base_rt_Id
and P_Effective_Date
Between Effective_Start_Date
and Effective_End_Date;
hr_utility.set_location('Delete VAR Rate' || Var_Rec.ACTY_VRBL_RT_ID ,15);
BEN_ACTY_VRBL_RATE_API.DELETE_ACTY_VRBL_RATE
(P_ACTY_VRBL_RT_ID => Var_Rec.ACTY_VRBL_RT_ID
,P_EFFECTIVE_START_DATE => L_Vrbl_esd
,P_EFFECTIVE_END_DATE => l_Vrbl_Eed
,P_OBJECT_VERSION_NUMBER => l_Vrbl_Ovn
,P_EFFECTIVE_DATE => P_Effective_Date
,P_DATETRACK_MODE => p_datetrack_mode);
hr_utility.set_location('abr to be deleted is '||Rates_Rec.ACTY_BASE_RT_ID,20);
ben_acty_base_rate_api.delete_acty_base_rate
(p_acty_base_rt_id => Rates_Rec.ACTY_BASE_RT_ID
,p_effective_start_date => L_Effective_Start_Date
,p_effective_end_date => L_Effective_End_Date
,p_object_version_number => l_Object_version_Number
,p_effective_date => p_effective_date
,p_datetrack_mode => p_datetrack_mode);
Function delete_option_for_point(p_spinal_point_id in number)
RETURN varchar2 is
l_effective_date date;
Select Opt_id , Effective_Start_Date,
Effective_End_Date, Object_version_number
From Ben_Opt_F
Where MAPPING_TABLE_NAME = 'PER_SPINAL_POINTS'
and MAPPING_TABLE_PK_ID = p_spinal_point_id
and l_Effective_Date
between Effective_Start_Date and Effective_End_Date;
Select Pl_typ_opt_Typ_Id,
Effective_Start_Date,
Effective_End_Date,
Object_Version_Number
from Ben_Pl_Typ_Opt_Typ_F
Where Opt_Id = P_Opt_id
and Pl_Typ_Opt_Typ_Cd = 'GSP';
hr_utility.set_location('opt to be deleted is'||Opts_Rec.Opt_id,20);
l_datetrack_mode := 'DELETE';
hr_utility.set_location('PLOptTyp to be deleted is'||l_Pl_Typ_Opt_Typ_Id,30);
ben_plan_type_option_type_api.Delete_Plan_Type_Option_Type
(P_PL_TYP_OPT_TYP_ID => l_Pl_Typ_Opt_Typ_Id
,P_EFFECTIVE_START_DATE => l_opt_typ_Esd
,P_EFFECTIVE_END_DATE => l_Opt_Typ_Eed
,P_OBJECT_VERSION_NUMBER => l_Opt_typ_Ovn
,P_EFFECTIVE_DATE => l_Effective_Date
,P_DATETRACK_MODE => l_datetrack_mode);
hr_utility.set_location('PLOptTyp Deleted',40);
ben_option_definition_api.delete_option_definition
(p_opt_id => Opts_Rec.Opt_id
,p_effective_start_date => L_Effective_Start_Date
,p_effective_end_date => L_Effective_End_Date
,p_object_version_number => L_ovn_No
,p_effective_date => l_Effective_Date
,p_datetrack_mode => l_datetrack_mode);
Function delete_oipl_for_step(p_grade_id in number,
p_spinal_point_id in number,
p_step_id in number,
p_effective_date in date,
p_datetrack_mode in varchar2)
RETURN varchar2 is
Cursor Oipl Is
Select Oipl.Oipl_id , Oipl.Effective_Start_Date,
Oipl.Effective_End_Date, Oipl.Object_version_number
From Ben_Oipl_F Oipl, Ben_Opt_F opt, Ben_pl_F Pl
Where Opt.MAPPING_TABLE_NAME = 'PER_SPINAL_POINTS'
and Opt.MAPPING_TABLE_PK_ID = p_spinal_point_id
and p_effective_date
between Opt.Effective_Start_Date and Opt.Effective_End_Date
and Pl.MAPPING_TABLE_NAME = 'PER_GRADES'
and Pl.MAPPING_TABLE_PK_ID = p_grade_id
and p_effective_date
between Pl.Effective_Start_Date and Pl.Effective_End_Date
and Opt.Opt_id = Oipl.Opt_id
and Pl.Pl_Id = Oipl.Pl_Id
and p_effective_date
between Oipl.Effective_Start_Date and Oipl.Effective_End_Date;
ben_Option_in_Plan_api.delete_Option_in_Plan
(p_oipl_id => Oipl_Rec.Oipl_Id
,p_effective_start_date => L_Effective_Start_Date
,p_effective_end_date => L_Effective_End_Date
,p_object_version_number => l_Object_version_Number
,p_effective_date => p_effective_date
,p_datetrack_mode => p_datetrack_mode);
select oipl_id
into l_oipl_id
from ben_oipl_f
where pl_id = p_pl_id
and opt_id = p_opt_id
and p_effective_date between effective_start_date and effective_end_date;
hr_utility.set_location('issues in selecting oipl detail',120);
select max(ordr_num)
into l_max_seq
from ben_oipl_f
where pl_id = p_pl_id
and p_effective_date between effective_start_date and effective_end_date;
hr_utility.set_location('issues in selecting oipl detail',120);
Select opt_id
From ben_opt_f
Where mapping_table_name = 'PER_SPINAL_POINTS'
and mapping_table_pk_id = p_spinal_point_id;
Select pl_typ_id
From ben_pl_typ_f
Where opt_typ_cd = 'GSP'
and business_group_id = p_business_group_id
and l_effective_date between effective_start_date and effective_end_date;
Select PL_Id, Effective_Start_Date, Effective_End_Date,business_group_id
From Ben_Pl_F
Where MAPPING_TABLE_NAME = 'PER_GRADES'
and MAPPING_TABLE_PK_ID = p_grade_id
and p_effective_date between Effective_Start_Date and Effective_End_Date;
select psp.spinal_point_id spinal_point_id,psp.spinal_point spinal_point,pps.name scale_name
from per_spinal_points psp, per_parent_spines pps
where psp.spinal_point_id = p_spinal_point_id
and psp.parent_spine_id = pps.parent_spine_id;
Select opt.Opt_id , opt.Effective_Start_Date,
opt.Effective_End_Date,step.sequence ordr_num
From Ben_Opt_F opt, Per_Spinal_POint_Steps_F Step
Where Opt.MAPPING_TABLE_NAME = 'PER_SPINAL_POINTS'
and Opt.MAPPING_TABLE_PK_ID = p_spinal_point_id
and p_effective_date
between Opt.Effective_Start_Date and Opt.Effective_End_Date
and Step.Step_id = P_Step_id
and p_effective_date
between Step.Effective_Start_Date and Step.Effective_End_Date
and Step.Spinal_Point_id = p_spinal_point_id;