DECLARE
l_effective_start_date DATE;
l_effective_end_date DATE;
l_entries_warning BOOLEAN;
CURSOR c1
IS
SELECT *
FROM hr.pay_element_links_f
WHERE ELEMENT_LINK_ID IN (SELECT ELEMENT_LINK_ID FROM TMP_TABLE);
BEGIN
FOR r1 IN c1
LOOP
PAY_ELEMENT_LINK_API.delete_element_link (
p_effective_date => R1.EFFECTIVE_START_DATE,
p_element_link_id => r1.ELEMENT_LINK_ID,
p_datetrack_delete_mode => 'ZAP',
p_object_version_number => R1.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 ('DELETED');
END LOOP;
COMMIT;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.PUT_LINE ('ERROR' || ' ' || SQLERRM);
END;
l_effective_start_date DATE;
l_effective_end_date DATE;
l_entries_warning BOOLEAN;
CURSOR c1
IS
SELECT *
FROM hr.pay_element_links_f
WHERE ELEMENT_LINK_ID IN (SELECT ELEMENT_LINK_ID FROM TMP_TABLE);
BEGIN
FOR r1 IN c1
LOOP
PAY_ELEMENT_LINK_API.delete_element_link (
p_effective_date => R1.EFFECTIVE_START_DATE,
p_element_link_id => r1.ELEMENT_LINK_ID,
p_datetrack_delete_mode => 'ZAP',
p_object_version_number => R1.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 ('DELETED');
END LOOP;
COMMIT;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.PUT_LINE ('ERROR' || ' ' || SQLERRM);
END;