DECLARE
l_competence_element_id NUMBER := NULL;
l_object_version_number NUMBER := NULL;
CURSOR c1
IS
SELECT *
FROM
per_competences
WHERE
business_group_id = 9999
AND
name IN ('Decision Making',
'Problem Solving');
BEGIN
FOR
i IN c1
LOOP
BEGIN
l_competence_element_id := NULL;
l_object_version_number := NULL;
hr_competence_element_api.create_competence_element
(
p_validate => FALSE,
p_competence_element_id => l_competence_element_id,
p_object_version_number => l_object_version_number,
p_type => 'REQUIREMENT',
p_business_group_id => 10529,
p_competence_id => i.competence_id,
p_position_id => 853909,
p_effective_date_from => '01-JAN-2016',
p_effective_date => '01-JAN-2016');
COMMIT;
DBMS_OUTPUT.put_line
(
l_competence_element_id || '
has been Created');
EXCEPTION
WHEN
OTHERS
THEN
DBMS_OUTPUT.put_line
(
'Failure: ' || i.competence_id ||
'- ' || SQLERRM);
END;
END
LOOP;
EXCEPTION
WHEN
OTHERS
THEN
DBMS_OUTPUT.put_line
('Main Exception: ' || SQLERRM);
END;
No comments:
Post a Comment