DECLARE
l_emp_num varchar2(20);
l_person_id number;
l_assignment_id number;
l_asg_object_version_number number;
l_effective_start_date date;
l_effective_end_date date;
l_full_name varchar2(240);
l_per_comment_id number;
l_assignment_sequence number;
l_assignment_number per_all_assignments_f.assignment_number%TYPE;
l_name_combination_warning boolean;
l_assign_payroll_warning boolean;
l_orig_hire_warning boolean;
l_per_object_version_number number;
l_asgobject_version_number number;
l_comment_id number(5);
CURSOR CUR_TP IS
SELECT tp.hire_date
,tp.business_group_id
,tp.last_name
,tp.sex
FROM TEMP_PERSON tp ;
BEGIN
for ap in CUR_TP loop
l_emp_num:=null;
begin
HR_EMPLOYEE_API.CREATE_EMPLOYEE
(
p_hire_date => ap.hire_date
,p_business_group_id => ap.business_group_id
,p_last_name => ap.last_name
,p_sex => ap.sex
,p_employee_number => l_emp_num
,p_person_id => l_person_id
,p_assignment_id => l_assignment_id
,p_per_object_version_number => l_per_object_version_number
,p_asg_object_version_number => l_asgobject_version_number
,p_per_effective_start_date => l_effective_start_date
,p_per_effective_end_date => l_effective_end_date
,p_full_name => l_full_name
,p_per_comment_id => l_comment_id
,p_assignment_sequence => l_assignment_sequence
,p_assignment_number => l_assignment_number
,p_name_combination_warning => l_name_combination_warning
,p_assign_payroll_warning => l_assign_payroll_warning
,p_orig_hire_warning => l_orig_hire_warning
);
end;
END LOOP;
COMMIT;
END;
/
hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
hr_utility.raise_error;
Ur's
AmarAlam
1 comments:
Thanks for this API create Employee, i appreciate it.
Please, i need to an API for Update Assignments after creating Employee.
E-mail :bigafees2000@yahoo.com
Post a Comment