Oracle HRMS API – Rehire Employee
Posted
by PRajkumar
on Oracle Blogs
See other posts from Oracle Blogs
or by PRajkumar
Published on Sat, 9 Jun 2012 21:03:25 +0000
Indexed on
2012/06/09
22:44 UTC
Read the original article
Hit count: 1464
/Oracle
API -- hr_employee_api.re_hire_ex_employee
Example --
Consider a Ex-Employee we will try to Rehire that employee using Rehire API
DECLARE
ln_per_object_version_number PER_ALL_PEOPLE_F.OBJECT_VERSION_NUMBER%TYPE := 5;
ln_assg_object_version_number PER_ALL_ASSIGNMENTS_F.OBJECT_VERSION_NUMBER%TYPE;
ln_assignment_id PER_ALL_ASSIGNMENTS_F.ASSIGNMENT_ID%TYPE;
ld_per_effective_start_date PER_ALL_PEOPLE_F.EFFECTIVE_START_DATE%TYPE;
ld_per_effective_end_date PER_ALL_PEOPLE_F.EFFECTIVE_END_DATE%TYPE;
ln_assignment_sequence PER_ALL_ASSIGNMENTS_F.ASSIGNMENT_SEQUENCE%TYPE;
lb_assign_payroll_warning BOOLEAN;
lc_assignment_number PER_ALL_ASSIGNMENTS_F.ASSIGNMENT_NUMBER%TYPE;
-- Rehire Employee API
-- --------------------------------
hr_employee_api.re_hire_ex_employee
( -- Input data elements
-- -----------------------------
p_hire_date => TO_DATE('28-JUN-2011'),
p_person_id => 32979,
p_rehire_reason => NULL,
-- Output data elements
-- --------------------------------
p_assignment_id => ln_assignment_id,
p_per_object_version_number => ln_per_object_version_number,
p_asg_object_version_number => ln_assg_object_version_number,
p_per_effective_start_date => ld_per_effective_start_date,
p_per_effective_end_date => ld_per_effective_end_date,
p_assignment_sequence => ln_assignment_sequence,
p_assignment_number => lc_assignment_number,
p_assign_payroll_warning => lb_assign_payroll_warning
);
COMMIT;
EXCEPTION
WHEN OTHERS THEN
ROLLBACK;
dbms_output.put_line(SQLERRM);
END;
/
SHOW ERR;
© Oracle Blogs or respective owner