CREATE OR REPLACE PROCEDURE delete_element_links
IS
CURSOR c_comp
IS
SELECT effective_start_date, element_link_id, object_version_number
FROM pay_element_links_f;
lc_c_comp c_comp%ROWTYPE;
l_comp_id NUMBER;
l_effective_start_date DATE;
l_effective_end_date DATE;
l_entries_warning BOOLEAN;
BEGIN
OPEN c_comp;
LOOP
FETCH c_comp INTO lc_c_comp;
EXIT WHEN c_comp%NOTFOUND;
BEGIN
DBMS_OUTPUT.put_line ('Ran');
pay_element_link_api.
delete_element_link (
p_validate => FALSE,
p_effective_date => lc_c_comp.effective_start_date,
p_element_link_id => lc_c_comp.element_link_id,
p_datetrack_delete_mode => 'ZAP',
p_object_version_number => lc_c_comp.object_version_number,
p_effective_start_date => l_effective_start_date,
p_effective_end_date => l_effective_end_date,
p_entries_warning => l_entries_warning);
DBMS_OUTPUT.put_line (l_effective_start_date);
END;
l_effective_start_date := NULL;
l_effective_end_date := NULL;
END LOOP;
CLOSE c_comp;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line (SUBSTR (SQLERRM, 1, 254));
END;
/
No comments:
Post a Comment