--
/*This API creates person in the United Kingdom business group.*/
--
declare
--
l_validate boolean := false;
--- DECLARE variables for HR_EMPLOYEE_WORKER_API.create_gb_employee
--- IN variables
l_hire_date per_all_people_f.start_date%type := trunc(sysdate);
l_last_name per_all_people_f.last_name%type := 'Kumar';
l_first_name per_all_people_f.first_name%type := 'Abhay';
l_middle_names per_all_people_f.middle_names%type ;
l_sex per_all_people_f.sex%type := 'M';
l_known_as per_all_people_f.known_as%type ;
--per_all_people_f.date_of_birth%type
l_date_of_birth date := to_date('11/11/1999','DD/MM/YYYY');
--per_all_people_f.marital_status%type
l_marital_status varchar2(10) := 'S'; --hr_lookups--'MARITAL_STATUS'
l_ni_number per_all_people_f.national_identifier%type := 123456;
l_title per_all_people_f.title%type := 'MR.'; --hr_lookups--'TITLE'
l_email per_all_people_f.email%type := 'testadd@abhayappssolution.com';
l_nationality per_all_people_f.nationality%type := 'IN'; --hr_lookups--'NATIONALITY'
l_employee_number per_all_people_f.employee_number%type := 567890;
l_director varchar2(1) default 'N';
l_ni_multiple_asg varchar2(1) default 'N';
l_pensioner varchar2(1);
l_business_group_id per_business_groups.business_group_id%type := 101;
l_person_type_id per_person_types.person_type_id%type := 1128;
l_ethnic_origin hr_lookups.lookup_code%type := 'A_IND'; --hr_lookups--'ETH_TYPE'
l_service_date date;
--- OUT variables
l_person_id number default null;
l_assignment_id number default null;
l_per_object_version_number number;
l_asg_object_version_number number;
l_per_effective_start_date date;
l_per_effective_end_date date;
l_full_name varchar2(300);
l_per_comment_id number;
l_assignment_sequence number;
l_assignment_number varchar2(10);
l_name_combination_warning boolean := false;
l_assign_payroll_warning boolean := false;
l_orig_hire_warning boolean := false;
--
begin
--
hr_employee_api.create_gb_employee (
p_validate => l_validate --in boolean default false
,p_hire_date => l_hire_date --in date
,p_business_group_id => l_business_group_id --in number
,p_last_name => l_last_name --in varchar2
,p_sex => l_sex --in varchar2
,p_person_type_id => l_person_type_id --in number default null
,p_comments => null --in varchar2 default null
,p_date_employee_data_verified => null --in date default null
,p_date_of_birth => l_date_of_birth --in date default null
,p_email_address => l_email --in varchar2 default null
,p_employee_number => l_employee_number
,p_expense_check_send_to_addres => 'H' --Mailing address
,p_first_name => l_first_name --in varchar2 default null
,p_known_as => l_known_as --in varchar2 default null
,p_marital_status => l_marital_status --in varchar2 default null
,p_middle_names => l_middle_names --in varchar2 default null
,p_nationality => l_nationality --in varchar2 default null
,p_ni_number => l_ni_number --in varchar2 default null
,p_previous_last_name => null --in varchar2 default null
,p_registered_disabled_flag => null --in varchar2 default null
,p_title => l_title --in varchar2 default null
,p_vendor_id => null --in number default null
,p_work_telephone => null --in varchar2 default null
,p_attribute_category => null --in varchar2 default null
,p_attribute1 => null --in varchar2 default null
,p_attribute2 => null --in varchar2 default null
,p_attribute30 => null --in varchar2 default null
,p_ethnic_origin => l_ethnic_origin --in varchar2 default null
,p_director => l_director --in varchar2 default 'N'
,p_pensioner => l_pensioner --in varchar2 default 'N'
,p_work_permit_number => null --in varchar2 default null
,p_addl_pension_years => null --in varchar2 default null
,p_addl_pension_months => null --in varchar2 default null
,p_addl_pension_days => null --in varchar2 default null
,p_ni_multiple_asg => l_ni_multiple_asg --in varchar2 default 'N'
,p_date_of_death => null --in date default null
,p_background_check_status => null --in varchar2 default null
,p_background_date_check => null --in date default null
,p_blood_type => null --in varchar2 default null
,p_correspondence_language => null --in varchar2 default null
,p_fast_path_employee => null --in varchar2 default null
,p_fte_capacity => null --in number default null
,p_honors => null --in varchar2 default null
,p_internal_location => null --in varchar2 default null
,p_last_medical_test_by => null --in varchar2 default null
,p_last_medical_test_date => null --in date default null
,p_mailstop => null
,p_office_number => null --in varchar2 default null
,p_on_military_service => null --in varchar2 default null
,p_pre_name_adjunct => null --in varchar2 default null
,p_rehire_recommendation => null --in varchar2 default null
,p_projected_start_date => null --in date default null
,p_resume_exists => null --in varchar2 default null
,p_resume_last_updated => null --in date default null
,p_second_passport_exists => null --in varchar2 default null
,p_student_status => null --in varchar2 default null
,p_work_schedule => null --in varchar2 default null
,p_suffix => null --in varchar2 default null
,p_benefit_group_id => null --in number default null
,p_receipt_of_death_cert_date => null --in varchar2 default null
,p_coord_ben_med_pln_no => null --in varchar2 default null
,p_coord_ben_no_cvg_flag => 'N' --in varchar2 default 'N'
,p_coord_ben_med_ext_er => null --in varchar2 default null
,p_coord_ben_med_pl_name => null --in varchar2 default null
,p_coord_ben_med_insr_crr_name => null --in varchar2 default null
,p_coord_ben_med_insr_crr_ident => null --in varchar2 default null
,p_coord_ben_med_cvg_strt_dt => null --in date default null
,p_coord_ben_med_cvg_end_dt => null --in date default null
,p_uses_tobacco_flag => null --in varchar2 default null
,p_dpdnt_adoption_date => null --in date default null
,p_dpdnt_vlntry_svce_flag => 'N' --in varchar2 default 'N'
,p_original_date_of_hire => null --in varchar2 default null
,p_adjusted_svc_date => l_service_date --in date default null
,p_town_of_birth => null --in varchar2 default null
,p_region_of_birth => null --in varchar2 default null
,p_country_of_birth => null --in varchar2 default null
,p_global_person_id => null --in varchar2 default null
,p_party_id => null --in number default null
--Out Variables
,p_person_id => l_person_id --out nocopy number
,p_assignment_id => l_assignment_id
,p_per_object_version_number => l_per_object_version_number
,p_asg_object_version_number => l_asg_object_version_number
,p_per_effective_start_date => l_per_effective_start_date
,p_per_effective_end_date => l_per_effective_end_date
,p_full_name => l_full_name
,p_per_comment_id => l_per_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 --out nocopy boolean
);
--
if (l_name_combination_warning = true or l_assign_payroll_warning = true or l_orig_hire_warning = true) then
dbms_output.put_line('Warning validating API: hr_employee_api.create_gb_employee');
rollback;
else
dbms_output.put_line('Employee Created: ');
commit;
end if;
--
exception
when others then
dbms_output.put_line('Error: '||sqlerrm);
rollback;
end;
/*This API creates person in the United Kingdom business group.*/
--
declare
--
l_validate boolean := false;
--- DECLARE variables for HR_EMPLOYEE_WORKER_API.create_gb_employee
--- IN variables
l_hire_date per_all_people_f.start_date%type := trunc(sysdate);
l_last_name per_all_people_f.last_name%type := 'Kumar';
l_first_name per_all_people_f.first_name%type := 'Abhay';
l_middle_names per_all_people_f.middle_names%type ;
l_sex per_all_people_f.sex%type := 'M';
l_known_as per_all_people_f.known_as%type ;
--per_all_people_f.date_of_birth%type
l_date_of_birth date := to_date('11/11/1999','DD/MM/YYYY');
--per_all_people_f.marital_status%type
l_marital_status varchar2(10) := 'S'; --hr_lookups--'MARITAL_STATUS'
l_ni_number per_all_people_f.national_identifier%type := 123456;
l_title per_all_people_f.title%type := 'MR.'; --hr_lookups--'TITLE'
l_email per_all_people_f.email%type := 'testadd@abhayappssolution.com';
l_nationality per_all_people_f.nationality%type := 'IN'; --hr_lookups--'NATIONALITY'
l_employee_number per_all_people_f.employee_number%type := 567890;
l_director varchar2(1) default 'N';
l_ni_multiple_asg varchar2(1) default 'N';
l_pensioner varchar2(1);
l_business_group_id per_business_groups.business_group_id%type := 101;
l_person_type_id per_person_types.person_type_id%type := 1128;
l_ethnic_origin hr_lookups.lookup_code%type := 'A_IND'; --hr_lookups--'ETH_TYPE'
l_service_date date;
--- OUT variables
l_person_id number default null;
l_assignment_id number default null;
l_per_object_version_number number;
l_asg_object_version_number number;
l_per_effective_start_date date;
l_per_effective_end_date date;
l_full_name varchar2(300);
l_per_comment_id number;
l_assignment_sequence number;
l_assignment_number varchar2(10);
l_name_combination_warning boolean := false;
l_assign_payroll_warning boolean := false;
l_orig_hire_warning boolean := false;
--
begin
--
hr_employee_api.create_gb_employee (
p_validate => l_validate --in boolean default false
,p_hire_date => l_hire_date --in date
,p_business_group_id => l_business_group_id --in number
,p_last_name => l_last_name --in varchar2
,p_sex => l_sex --in varchar2
,p_person_type_id => l_person_type_id --in number default null
,p_comments => null --in varchar2 default null
,p_date_employee_data_verified => null --in date default null
,p_date_of_birth => l_date_of_birth --in date default null
,p_email_address => l_email --in varchar2 default null
,p_employee_number => l_employee_number
,p_expense_check_send_to_addres => 'H' --Mailing address
,p_first_name => l_first_name --in varchar2 default null
,p_known_as => l_known_as --in varchar2 default null
,p_marital_status => l_marital_status --in varchar2 default null
,p_middle_names => l_middle_names --in varchar2 default null
,p_nationality => l_nationality --in varchar2 default null
,p_ni_number => l_ni_number --in varchar2 default null
,p_previous_last_name => null --in varchar2 default null
,p_registered_disabled_flag => null --in varchar2 default null
,p_title => l_title --in varchar2 default null
,p_vendor_id => null --in number default null
,p_work_telephone => null --in varchar2 default null
,p_attribute_category => null --in varchar2 default null
,p_attribute1 => null --in varchar2 default null
,p_attribute2 => null --in varchar2 default null
,p_attribute30 => null --in varchar2 default null
,p_ethnic_origin => l_ethnic_origin --in varchar2 default null
,p_director => l_director --in varchar2 default 'N'
,p_pensioner => l_pensioner --in varchar2 default 'N'
,p_work_permit_number => null --in varchar2 default null
,p_addl_pension_years => null --in varchar2 default null
,p_addl_pension_months => null --in varchar2 default null
,p_addl_pension_days => null --in varchar2 default null
,p_ni_multiple_asg => l_ni_multiple_asg --in varchar2 default 'N'
,p_date_of_death => null --in date default null
,p_background_check_status => null --in varchar2 default null
,p_background_date_check => null --in date default null
,p_blood_type => null --in varchar2 default null
,p_correspondence_language => null --in varchar2 default null
,p_fast_path_employee => null --in varchar2 default null
,p_fte_capacity => null --in number default null
,p_honors => null --in varchar2 default null
,p_internal_location => null --in varchar2 default null
,p_last_medical_test_by => null --in varchar2 default null
,p_last_medical_test_date => null --in date default null
,p_mailstop => null
,p_office_number => null --in varchar2 default null
,p_on_military_service => null --in varchar2 default null
,p_pre_name_adjunct => null --in varchar2 default null
,p_rehire_recommendation => null --in varchar2 default null
,p_projected_start_date => null --in date default null
,p_resume_exists => null --in varchar2 default null
,p_resume_last_updated => null --in date default null
,p_second_passport_exists => null --in varchar2 default null
,p_student_status => null --in varchar2 default null
,p_work_schedule => null --in varchar2 default null
,p_suffix => null --in varchar2 default null
,p_benefit_group_id => null --in number default null
,p_receipt_of_death_cert_date => null --in varchar2 default null
,p_coord_ben_med_pln_no => null --in varchar2 default null
,p_coord_ben_no_cvg_flag => 'N' --in varchar2 default 'N'
,p_coord_ben_med_ext_er => null --in varchar2 default null
,p_coord_ben_med_pl_name => null --in varchar2 default null
,p_coord_ben_med_insr_crr_name => null --in varchar2 default null
,p_coord_ben_med_insr_crr_ident => null --in varchar2 default null
,p_coord_ben_med_cvg_strt_dt => null --in date default null
,p_coord_ben_med_cvg_end_dt => null --in date default null
,p_uses_tobacco_flag => null --in varchar2 default null
,p_dpdnt_adoption_date => null --in date default null
,p_dpdnt_vlntry_svce_flag => 'N' --in varchar2 default 'N'
,p_original_date_of_hire => null --in varchar2 default null
,p_adjusted_svc_date => l_service_date --in date default null
,p_town_of_birth => null --in varchar2 default null
,p_region_of_birth => null --in varchar2 default null
,p_country_of_birth => null --in varchar2 default null
,p_global_person_id => null --in varchar2 default null
,p_party_id => null --in number default null
--Out Variables
,p_person_id => l_person_id --out nocopy number
,p_assignment_id => l_assignment_id
,p_per_object_version_number => l_per_object_version_number
,p_asg_object_version_number => l_asg_object_version_number
,p_per_effective_start_date => l_per_effective_start_date
,p_per_effective_end_date => l_per_effective_end_date
,p_full_name => l_full_name
,p_per_comment_id => l_per_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 --out nocopy boolean
);
--
if (l_name_combination_warning = true or l_assign_payroll_warning = true or l_orig_hire_warning = true) then
dbms_output.put_line('Warning validating API: hr_employee_api.create_gb_employee');
rollback;
else
dbms_output.put_line('Employee Created: ');
commit;
end if;
--
exception
when others then
dbms_output.put_line('Error: '||sqlerrm);
rollback;
end;
I was taking a gander at some of your posts on this site and I consider this site is truly informational! Keep setting up..
ReplyDeletewww.jantakhoj.com