HR: Bulk Deletion/ending of element entries
HR: Bulk Deletion/ending of element entries
Declare
-- select all active opening balances
Cursor op_end_cur Is
Select pee.element_entry_id
From pay_element_types_f petf
,pay_element_entries pee
,pay_element_links_f pelf
,per_all_assignments_f paaf
Where petf.element_type_id = pee.element_type_id
And pelf.element_type_id = petf.element_type_id
And pelf.element_type_id = pee.element_type_id
And pelf.element_link_id = pee.element_link_id
And petf.element_name = <>
And paaf.assignment_id = pee.assignment_id
And <> between paaf.effective_start_date and paaf.effective_end_date;
l_v number := null;
l_s_date date;
l_e_date date;
l_w boolean;
Begin
pay_db_pay_setup.set_session_date(<>);
-- ending opening balance cursor
For op_end In op_end_cur
Loop
hr_entry_api.delete_element_entry(p_dt_delete_mode => 'DELETE',
p_session_date => <>,
p_element_entry_id => op_end.element_entry_id);
Declare
-- select all active opening balances
Cursor op_end_cur Is
Select pee.element_entry_id
From pay_element_types_f petf
,pay_element_entries pee
,pay_element_links_f pelf
,per_all_assignments_f paaf
Where petf.element_type_id = pee.element_type_id
And pelf.element_type_id = petf.element_type_id
And pelf.element_type_id = pee.element_type_id
And pelf.element_link_id = pee.element_link_id
And petf.element_name = <
And paaf.assignment_id = pee.assignment_id
And <
l_v number := null;
l_s_date date;
l_e_date date;
l_w boolean;
Begin
pay_db_pay_setup.set_session_date(<
-- ending opening balance cursor
For op_end In op_end_cur
Loop
hr_entry_api.delete_element_entry(p_dt_delete_mode => 'DELETE',
p_session_date => <
p_element_entry_id => op_end.element_entry_id);
No comments:
Post a Comment