Salam Alaikum,
This is a very simple API that can be used to create phone details for employees.
This is a very simple API that can be used to create phone details for employees.
DECLAREHope you found it useful guys, feel free to leave a comment if have any note on the subject.
ln_phone_id per_phones.phone_id%TYPE;
ln_object_version_number per_phones.object_version_number%TYPE;
BEGIN
-- Create or Update Employee Phone Detail
-- -----------------------------------------------------------
hr_phone_api.create_or_update_phone
( -- Input data elements
-- -----------------------------
p_date_from => TO_DATE('01-JAN-1900'),
p_phone_type => 'M',
p_phone_number => '0566106406',
p_parent_id => 1102,
p_parent_table => 'PER_ALL_PEOPLE_F',
p_effective_date => TO_DATE('01-JAN-1900'),
-- Output data elements
-- --------------------------------
p_phone_id => ln_phone_id,
p_object_version_number => ln_object_version_number
);
DBMS_OUTPUT.put_line ('ln_phone_id ' || ln_phone_id);
--COMMIT;
EXCEPTION
WHEN OTHERS
THEN
ROLLBACK;
DBMS_OUTPUT.put_line (SQLERRM);
END;
No comments:
Post a Comment