The following lines contain the word 'select', 'insert', 'update' or 'delete':
select pbg.security_group_id
from per_business_groups pbg
, pay_user_rows_f pur
where pur.user_row_id = p_user_row_id
and pbg.business_group_id = pur.business_group_id;
select pbg.legislation_code
from per_business_groups pbg
, pay_user_rows_f pur
where pur.user_row_id = p_user_row_id
and pbg.business_group_id (+) = pur.business_group_id;
select null
from fnd_territories
where territory_code = p_legislation_code ;
select user_key_units
from pay_user_tables put
where put.user_table_id = p_user_table_id ;
select range_or_match
from pay_user_tables put
where put.user_table_id = p_user_table_id ;
select put.legislation_code , put.business_group_id
from pay_user_tables put
where put.user_table_id = p_user_table_id ;
select null
from pay_user_rows_f usr
where usr.user_table_id = p_user_table_id
and upper(usr.row_low_range_or_name) = upper(p_row_low_range_or_name)
and ( p_user_row_id is null
or ( p_user_row_id is not null and usr.user_row_id <> p_user_row_id ) )
and ( p_business_group_id is null
or ( p_business_group_id is not null and p_business_group_id = usr.business_group_id )
or ( p_business_group_id is not null and
usr.legislation_code is null and usr.business_group_id is null )
or ( p_business_group_id is not null and
usr.legislation_code = hr_api.return_legislation_code(p_business_group_id )))
and ( p_legislation_code is null
or ( p_legislation_code is not null and p_legislation_code = usr.legislation_code )
or ( p_legislation_code is not null and
usr.legislation_code is null and usr.business_group_id is null)
or ( p_legislation_code is not null and
p_legislation_code = hr_api.return_legislation_code(usr.business_group_id )))
and ( usr.effective_start_date <= p_validation_end_date and
usr.effective_end_date >= p_validation_start_date );
select null
from pay_user_rows_f usr
where usr.user_table_id = p_user_table_id
and ( p_user_row_id is null
or ( p_user_row_id is not null and usr.user_row_id <> p_user_row_id ) )
and ( p_business_group_id is null
or ( p_business_group_id is not null and p_business_group_id = usr.business_group_id )
or ( p_business_group_id is not null and
usr.legislation_code is null and usr.business_group_id is null )
or ( p_business_group_id is not null and
usr.legislation_code = hr_api.return_legislation_code(p_business_group_id ) ))
and ( p_legislation_code is null
or ( p_legislation_code is not null and p_legislation_code = usr.legislation_code )
or ( p_legislation_code is not null and
usr.legislation_code is null and usr.business_group_id is null)
or ( p_legislation_code is not null and
p_legislation_code = hr_api.return_legislation_code(usr.business_group_id) ))
and (fnd_number.canonical_to_number(p_row_low_range_or_name) between
fnd_number.canonical_to_number(usr.row_low_range_or_name) and fnd_number.canonical_to_number(usr.row_high_range)
or (fnd_number.canonical_to_number(p_row_high_range) between
fnd_number.canonical_to_number(usr.row_low_range_or_name) and fnd_number.canonical_to_number(usr.row_high_range))
or (fnd_number.canonical_to_number(usr.row_low_range_or_name) between
fnd_number.canonical_to_number(p_row_low_range_or_name) and fnd_number.canonical_to_number(p_row_high_range))
or (fnd_number.canonical_to_number(usr.row_high_range) between
fnd_number.canonical_to_number(p_row_low_range_or_name) and fnd_number.canonical_to_number(p_row_high_range)))
and ( usr.effective_start_date <= p_validation_end_date and
usr.effective_end_date >= p_validation_start_date );
procedure chk_delete
(p_user_table_id in number
,p_user_row_id in number
,p_row_low_range_or_name in varchar2
,p_row_high_range in varchar2
,p_datetrack_mode in varchar2
,p_business_group_id in number
,p_legislation_code in varchar2
,p_disable_range_overlap_check in boolean
,p_validation_start_date in date
,p_validation_end_date in date
)is
--
cursor csr_unique_name is
select null
from pay_user_rows_f usr
where usr.user_table_id = p_user_table_id
and upper(usr.row_low_range_or_name) = upper(p_row_low_range_or_name)
and ( p_user_row_id is null
or ( p_user_row_id is not null and usr.user_row_id <> p_user_row_id ) )
and ( p_business_group_id is null
or ( p_business_group_id is not null and p_business_group_id = usr.business_group_id )
or ( p_business_group_id is not null and
usr.legislation_code is null and usr.business_group_id is null )
or ( p_business_group_id is not null and
usr.legislation_code = hr_api.return_legislation_code(p_business_group_id ) ))
and ( p_legislation_code is null
or ( p_legislation_code is not null and p_legislation_code = usr.legislation_code )
or ( p_legislation_code is not null and
usr.legislation_code is null and usr.business_group_id is null)
or ( p_legislation_code is not null and
p_legislation_code = hr_api.return_legislation_code(usr.business_group_id ) ))
and ( usr.effective_start_date <= p_validation_end_date and
usr.effective_end_date >= p_validation_start_date );
select null
from pay_user_rows_f usr
where usr.user_table_id = p_user_table_id
and ( p_user_row_id is null
or ( p_user_row_id is not null and usr.user_row_id <> p_user_row_id ) )
and ( p_business_group_id is null
or ( p_business_group_id is not null and p_business_group_id = usr.business_group_id )
or ( p_business_group_id is not null and
usr.legislation_code is null and usr.business_group_id is null )
or ( p_business_group_id is not null and
usr.legislation_code = hr_api.return_legislation_code(p_business_group_id ) ))
and ( p_legislation_code is null
or ( p_legislation_code is not null and p_legislation_code = usr.legislation_code )
or ( p_legislation_code is not null and
usr.legislation_code is null and usr.business_group_id is null)
or ( p_legislation_code is not null and
p_legislation_code = hr_api.return_legislation_code(usr.business_group_id ) ))
and (fnd_number.canonical_to_number(p_row_low_range_or_name) between
fnd_number.canonical_to_number(usr.row_low_range_or_name) and fnd_number.canonical_to_number(usr.row_high_range)
or (fnd_number.canonical_to_number(p_row_high_range) between
fnd_number.canonical_to_number(usr.row_low_range_or_name) and fnd_number.canonical_to_number(usr.row_high_range))
or (fnd_number.canonical_to_number(usr.row_low_range_or_name) between
fnd_number.canonical_to_number(p_row_low_range_or_name) and fnd_number.canonical_to_number(p_row_high_range))
or (fnd_number.canonical_to_number(usr.row_high_range) between
fnd_number.canonical_to_number(p_row_low_range_or_name) and fnd_number.canonical_to_number(p_row_high_range)))
and ( usr.effective_start_date <= p_validation_end_date and
usr.effective_end_date >= p_validation_start_date );
select null
from pay_user_column_instances_f
where user_row_id = p_user_row_id ;
cursor csr_delete_mode is
select null
from pay_user_column_instances_f
where user_row_id = p_user_row_id
and effective_end_date >= p_validation_start_date ;
l_proc varchar2(100) := g_package || 'chk_delete';
if p_datetrack_mode = hr_api.g_delete then
open csr_delete_mode;
fetch csr_delete_mode into l_exists;
if csr_delete_mode%found then
close csr_delete_mode;
close csr_delete_mode;
elsif p_datetrack_mode in (hr_api.g_future_change,hr_api.g_delete_next_change) then
l_result := fnd_installation.get_app_info ( 'GHR',
l_prod_status,
l_industry,
l_oracle_scheema );
if csr_delete_mode%isopen then
close csr_delete_mode;
End chk_delete;
Procedure chk_non_updateable_args
(p_effective_date in date
,p_rec in pay_pur_shd.g_rec_type
) IS
--
l_proc varchar2(72) := g_package || 'chk_non_updateable_args';
End chk_non_updateable_args;
Procedure dt_update_validate
(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_user_row_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 = hr_api.g_delete or
p_datetrack_mode = hr_api.g_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;
(p_insert IN boolean
,p_business_group_id IN number
,p_legislation_code IN varchar2
,p_legislation_subgroup IN varchar2 DEFAULT NULL) IS
--
BEGIN
--
-- Call the supporting procedure to check startup mode
IF (p_insert) THEN
if p_business_group_id is not null and p_legislation_code is not null then
fnd_message.set_name('PAY', 'PAY_33179_BGLEG_INVALID');
Procedure insert_validate
(p_rec in out nocopy pay_pur_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
,p_disable_units_check in boolean
,p_disable_range_overlap_check in boolean
) is
--
l_proc varchar2(72) := g_package||'insert_validate';
End insert_validate;
Procedure update_validate
(p_rec in out nocopy pay_pur_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
,p_disable_units_check in boolean
,p_disable_range_overlap_check in boolean
) is
--
l_proc varchar2(72) := g_package||'update_validate';
dt_update_validate
(p_datetrack_mode => p_datetrack_mode
,p_validation_start_date => p_validation_start_date
,p_validation_end_date => p_validation_end_date
);
chk_non_updateable_args
(p_effective_date => p_effective_date
,p_rec => p_rec
);
End update_validate;
Procedure delete_validate
(p_rec in pay_pur_shd.g_rec_type
,p_effective_date in date
,p_datetrack_mode in varchar2
,p_disable_range_overlap_check in boolean
,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_user_row_id => p_rec.user_row_id
);
chk_delete
(p_user_table_id => pay_pur_shd.g_old_rec.user_table_id
,p_user_row_id => p_rec.user_row_id
,p_row_low_range_or_name => pay_pur_shd.g_old_rec.row_low_range_or_name
,p_row_high_range => pay_pur_shd.g_old_rec.row_high_range
,p_datetrack_mode => p_datetrack_mode
,p_business_group_id => pay_pur_shd.g_old_rec.business_group_id
,p_legislation_code => pay_pur_shd.g_old_rec.legislation_code
,p_disable_range_overlap_check => p_disable_range_overlap_check
,p_validation_start_date => p_validation_start_date
,p_validation_end_date => p_validation_end_date
);
End delete_validate;