Sunday, January 11, 2015

API To Create Employee Phone

Salam Alaikum,

   This is a very simple API that can be used to create phone details for employees.
DECLARE
   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;
  Hope you found it useful guys, feel free to leave a comment if have any note on the subject.        

1 comment:

  1. Regards
    Sridevi Koduru (Senior Oracle Apps Trainer Oracleappstechnical.com)
    LinkedIn profile - https://in.linkedin.com/in/sridevi-koduru-9b876a8b
    Please Contact for One to One Online Training on Oracle Apps Technical, Financials, SCM, SQL, PL/SQL, D2K at training@oracleappstechnical.com | +91 - 9581017828.

    ReplyDelete