DECLARE
l_job_id NUMBER := NULL;
l_object_version_number NUMBER := NULL;
l_err_msg VARCHAR2 (500) := NULL;
l_name VARCHAR2 (500) := NULL;
l_job_definition_id NUMBER := NULL;
BEGIN
BEGIN
HR_JOB_API.create_job (
p_validate => FALSE,
p_business_group_id => 81,
p_date_from => TO_DATE ('01-JAN-1950', 'DD-MON-YYYY'),
p_job_group_id => 21,
p_segment1 => 'SUPERVISOR',
p_segment2 => 'SUPPORT',
p_job_id => l_job_id,
p_object_version_number => l_object_version_number,
p_job_definition_id => l_job_definition_id,
p_name => l_name
);
COMMIT;
DBMS_OUTPUT.put_line ('Job has been created: ' || l_job_id);
EXCEPTION
WHEN OTHERS
THEN
l_err_msg := SQLERRM;
DBMS_OUTPUT.put_line ('Inner Exception: ' || l_err_msg);
END;
EXCEPTION
WHEN OTHERS
THEN
l_err_msg := SQLERRM;
DBMS_OUTPUT.put_line ('Main Exception: ' || l_err_msg);
END;
No comments:
Post a Comment