HRMS employee’s Phone Migration
Hi guys today we will explain HRMS employee’s Phone Migration
Declare
v_object_version number;
v_phone_id number;
BEGIN
for HR_data in xx_emp loop
Begin
HR_Phone_Api.Create_Phone(
p_effective_date => sysdate,
p_date_from => To_Date('04-OCT-2010','DD-MON-YYYY'),
p_date_to => To_Date('04-OCT-2011','DD-MON-YYYY'),
p_phone_type => 'H1' ,
p_phone_number => '042-7075478' ,
p_parent_id => 223,
p_parent_table => 'PER_ALL_PEOPLE_F' ,
p_object_version_number => v_object_version ,
p_phone_id => v_phone_id
) ;
Commit;
begin
update XX_Emp_Phone
set Status = 'Done' , PERSON_ID = p_person_id , ERROR_MSG = null
where EMP_old_NO = HR_data.EMP_old_NO;
exception
when others then null;
end;
COMMIT;
EXCEPTION
WHEN OTHERS THEN
V_API_ERROR := SQLERRM;
V_ERROR_MSG := V_ERROR_MSG||' '||V_API_ERROR;
UPDATE XX_HR_EMPLOYYE_API_INTERFACE
SET ERROR_MSG = V_ERROR_MSG , Status = 'Error'
where EMP_old_NO = HR_data.EMP_old_NO;
COMMIT;
END;
end loop;
end ;


