HR Person API - Update Person (Employee and Contingent Worker)
//Update Employee and Contingent Worker API. Also help you for integration between Oracle ERP HR and SOA
DECLARE
v_api_error VARCHAR2 (5000);
v_error_msg VARCHAR2 (5000) := NULL;
p_nationality VARCHAR2 (200);
p_person_type_id NUMBER;
p_employee_number NUMBER;
p_person_id NUMBER;
p_assignment_id NUMBER;
p_per_object_version_number NUMBER:=19;
p_asg_object_version_number NUMBER;
p_per_effective_start_date DATE;
p_per_effective_end_date DATE;
p_full_name VARCHAR2 (150);
p_per_comment_id NUMBER;
p_assignment_sequence NUMBER;
p_assignment_number VARCHAR2 (100);
p_name_combination_warning BOOLEAN;
p_assign_payroll_warning BOOLEAN;
p_orig_hire_warning BOOLEAN;
p_business_group_id NUMBER;
p_object_version_number NUMBER;
p_validate BOOLEAN;
p_effective_date DATE;
p_effective_start_date DATE;
p_effective_end_date DATE;
p_comment_id NUMBER;
p_emp_num VARCHAR2 (50);
BEGIN
p_emp_num := '769123';
p_validate := FALSE;
p_effective_date := TRUNC (SYSDATE);
hr_person_api.update_person
(p_email_address => 'k@b.com',
p_title => 'MR',
p_person_type_id => 3186,
p_validate => p_validate,
p_effective_date => p_effective_date,
p_datetrack_update_mode => 'CORRECTION',
p_person_id => 221187,
p_object_version_number => p_per_object_version_number,
p_employee_number => p_emp_num,
p_full_name => p_full_name,
p_effective_start_date => p_effective_start_date,
p_effective_end_date => p_effective_end_date,
p_comment_id => p_comment_id,
p_name_combination_warning => p_name_combination_warning,
p_assign_payroll_warning => p_assign_payroll_warning,
p_orig_hire_warning => p_orig_hire_warning
);
EXCEPTION
WHEN OTHERS
THEN
p_emp_num := NULL;
p_validate := NULL;
p_effective_date := NULL;
p_person_id := NULL;
p_effective_start_date := NULL;
p_effective_end_date := NULL;
p_comment_id := NULL;
END;
No comments:
Post a Comment