--Create Employee
-- -------------------------
DECLARE
Lc_employee_number per_all_people_f.employee_number%type: = ' WRKNO1000001 ';
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;
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;
Lc_full_name Per_all_people_f.full_name%type;
LN_PER_COMMENT_ID Per_all_people_f.comment_id%type;
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 (
--Input data elements
-- ------------------------------
P_hire_date = to_date (' 08-jun-2015 '),
p_business_group_id = fnd_profile.value_specific (' per_business_group_id '),
P_last_name = ' QUAN ',
P_first_name = ' Weiru ',
P_middle_names = NULL,
P_sex = ' M ',
P_national_identifier = ' 183-09-6723 ',
P_date_of_birth = to_date (' 01-jun-1987 '),
p_known_as = ' Quanweiru ',
--Output data elements
-- --------------------------------
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;
EXCEPTION
When OTHERS
Then
ROLLBACK;
Dbms_output.put_line (SQLERRM);
END;
Oracle HRMS api–create Employee