Create an employee with API

This post I will show how create an employee with API

Execute this command below

DECLARE 
lc_employee_number per_all_people_f.employee_number%TYPE := '183096723';
ln_person_id per_all_people_f.person_id%TYPE ; 
ln_assignment_id per_all_assignments_f.assignment_id%TYPE; 
ln_object_ver_number per_all_assignments_f.object_version_number%TYPE; 
ln_asg_ovn NUMBER:=5; 
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:=NULL; 
lc_full_name per_all_people_f.full_name%TYPE; 
ln_per_comment_id per_all_people_f.comment_id%TYPE:=NULL; 
ln_assignment_sequence per_all_assignments_f.assignment_sequence%TYPE; 
lc_assignment_number per_all_assignments_f.assignment_number%TYPE; 
lb_name_combination_warning BOOLEAN; 
lb_assign_payroll_warning BOOLEAN; 
lb_orig_hire_warning BOOLEAN;
BEGIN 
HR_EMPLOYEE_API.create_employee (p_hire_date => TO_DATE('03/12/2011','DD/MM/YYYY'), 
p_business_group_id => FND_PROFILE.VALUE_SPECIFIC('PER_BUSINESS_GROUP_ID'), 
p_last_name => 'TESTE', 
p_first_name => 'TESTE', 
p_middle_names => NULL, 
p_sex => 'M', 
p_national_identifier => NULL, 
p_date_of_birth => TO_DATE('03/12/1988','DD/MM/YYYY'), 
p_known_as => 'TITI', 
p_employee_number => lc_employee_number, 
p_person_id => ln_person_id, 
p_assignment_id => ln_assignment_id, 
p_per_object_version_number => ln_object_ver_number, 
p_asg_object_version_number => ln_asg_ovn, 
p_per_effective_start_date => ld_per_effective_start_date, 
p_per_effective_end_date => ld_per_effective_end_date, 
p_full_name => lc_full_name, 
p_per_comment_id => ln_per_comment_id, 
p_assignment_sequence => ln_assignment_sequence, 
p_assignment_number => lc_assignment_number, 
p_name_combination_warning => lb_name_combination_warning, 
p_assign_payroll_warning => lb_assign_payroll_warning, 
p_orig_hire_warning => lb_orig_hire_warning ); 

COMMIT;
dbms_output.put_line('Employee with Employee Number: ' || lc_employee_number || ' created sucessfully');
EXCEPTION WHEN OTHERS THEN 
ROLLBACK; 
dbms_output.put_line(SQLERRM); 
END;

The employee was created.

Sem título

Deixe uma resposta

Powered by WordPress.com. Tema: Baskerville 2 por Anders Noren

Acima ↑

%d blogueiros gostam disto: