Oracle HRMS API – Create or Update Employee Phone

Posted by PRajkumar on Oracle Blogs See other posts from Oracle Blogs or by PRajkumar
Published on Sat, 9 Jun 2012 21:01:52 +0000 Indexed on 2012/06/09 22:44 UTC
Read the original article Hit count: 879

Filed under:

API --  hr_phone_api.create_or_update_phone

 

Example --

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('13-JUN-2011'),
        p_phone_type                          => 'W1',
        p_phone_number                   => '9999999',
        p_parent_id                              => 32979,
        p_parent_table                         => 'PER_ALL_PEOPLE_F',
        p_effective_date                       => TO_DATE('13-JUN-2011'),
        -- Output data elements
        -- --------------------------------
        p_phone_id                              => ln_phone_id,
        p_object_version_number    => ln_object_version_number
     );
 
 COMMIT;

EXCEPTION
      WHEN OTHERS THEN
                    ROLLBACK;
                     dbms_output.put_line(SQLERRM);
END;
/

SHOW ERR;

 

© Oracle Blogs or respective owner

Related posts about /Oracle