HRMS Employee API
HRMS Employee API
Use any SFTP tool to move the control file and data file received.
Eg: RESOURCE_TOP (XXCGS_RESRC/11.5.0/bin) at server side
Run SQL*Loader
Use any Network Protocol tool (putty/manager/telnet) to run the SQL*Loader program .
Enter the user name and pass word to login into the server.
Field Description
EmplID Employee’s ID
OUT Parameters:
Descriptive Flexfield:
To add descriptive flexfield to capture additional information for the particular Employee Person
data
-- ********************************************************************************************************
l_business_group_id per_all_assignments_f.business_group_id%TYPE;
l_per_comment_id per_all_people_f.comment_id%TYPE;
l_assignment_sequence per_all_assignments_f.assignment_sequence%TYPE;
l_assignment_number per_all_assignments_f.assignment_sequence%TYPE;
l_name_combination_warning BOOLEAN;
l_assign_payroll_warning BOOLEAN;
l_ORIG_HIRE_WARNING BOOLEAN;
l_person_id per_all_people_f.person_id%TYPE;
l_assignment_id per_all_assignments_f.assignment_id%TYPE;
l_per_object_version_number per_all_people_f.object_version_number%TYPE;
l_asg_object_version_number per_all_assignments_f.object_version_number%TYPE;
l_per_effective_start_date per_all_people_f.effective_start_date%TYPE;
l_per_effective_end_date per_all_people_f.effective_end_date%TYPE;
l_original_date_of_hire per_all_people_f.original_date_of_hire%TYPE;
l_nationality per_all_people_f.nationality%TYPE;
l_person_type_id per_all_people_f.person_type_id%TYPE;
l_per_information_category per_all_people_f.per_information_category%TYPE;
l_per_information7 per_all_people_f.per_information7%TYPE;
l_hire_date date;
v_person_id number;
v_assignment_id number;
v_per_object_version_number number;
v_asg_object_version_number number;
v_per_effective_start_date date;
v_per_effective_end_date date;
v_full_name varchar2(100);
v_per_comment_id number;
v_assignment_sequence number;
v_assignment_number varchar2(100);
v_name_combination_warning boolean;
v_orig_hire_warning boolean;
v_assign_payroll_warning boolean;
v_employee_number varchar2(20);
G_USER_ID number;
G_LOGIN_ID number;
v_resp_id number;
v_resp_APPL_id number;
v_business_group_id number;
v_emp_no varchar2(20);
CURSOR person_emp IS
SELECT xp.empl_id
,xp.empl_rcd_nbr
,xp.first_name
,xp.middle_name
,xp.last_name
,xp.name
,xp.highest_education_level
,decode(ltrim(rtrim(gender)),'U','M',ltrim(rtrim(gender))) gender
,xp.marital_status
,xp.date_of_birth
,xp.soe_id
,xp.rits_id
,xp.email
,xj.hire_date
,xp.alternate_employee_id
FROM xxhr_person_stg xp,
xxhr_job_stg xj
WHERE xp.empl_id = xj.empl_id
AND xp.empl_id NOT IN(SELECT employee_number FROM per_all_people_f);
BEGIN
G_USER_ID := FND_PROFILE.VALUE('USER_ID');
G_LOGIN_ID := FND_PROFILE.VALUE('LOGIN_ID');
v_resp_id := FND_PROFILE.VALUE('RESP_ID');
v_resp_APPL_id := FND_PROFILE.VALUE('RESP_APPL_ID');
v_business_group_id := FND_PROFILE.VALUE('PER_BUSINESS_GROUP_ID');
FND_GLOBAL.APPS_INITIALIZE(G_USER_ID,v_resp_id,v_resp_APPL_id);
-- ***************************************************************************
-- Create Personal Particulars for Employee
-- ***************************************************************************
--v_employee_number:= NULL;
hr_employee_api.create_employee
(p_validate => FALSE
,p_business_group_id => v_business_group_id
,p_last_name => v_person_emp.last_name
,p_first_name => v_person_emp.first_name
,p_sex => v_person_emp.gender
--,p_marital_status => v_person_emp.marital_status
,p_date_of_birth => v_person_emp.date_of_birth
,p_original_date_of_hire => v_person_emp.hire_date
,p_nationality => 'PQH_AT'
,p_email_address => v_person_emp.email
,p_hire_date => v_person_emp.hire_date
,p_person_type_id => l_person_type_id
,p_per_information_category => 'IN'
,p_per_information7 => 'RO'
,p_attribute_category => v_business_group_id
,p_attribute1 => v_person_emp.empl_rcd_nbr
,p_attribute2 => v_person_emp.name
,p_attribute3 => v_person_emp.highest_education_level
,p_attribute4 => v_person_emp.marital_status
,p_attribute5 => v_person_emp.soe_id
,p_attribute6 => v_person_emp.rits_id
,p_attribute7 => v_person_emp.alternate_employee_id
,p_employee_number => v_person_emp.empl_id
,p_person_id => v_person_id
,p_assignment_id => v_assignment_id
,p_per_object_version_number => v_per_object_version_number
,p_asg_object_version_number => v_asg_object_version_number
,p_per_effective_start_date => v_per_effective_start_date
,p_per_effective_end_date => v_per_effective_end_date
,p_full_name => v_full_name
,p_per_comment_id => v_per_comment_id
,p_assignment_sequence => v_assignment_sequence
,p_assignment_number => v_assignment_number
,p_name_combination_warning => v_name_combination_warning
,p_assign_payroll_warning => v_assign_payroll_warning
,P_ORIG_HIRE_WARNING => v_orig_hire_warning
);
COMMIT;
END LOOP;
DBMS_OUTPUT.PUT_LINE('Ex:'||v_person_id||','||v_assignment_id||','||
v_per_object_version_number);
COMMIT;
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE ('Error: '||SQLERRM);
END;
/
HR Assignment API
This API updates employee assignment details which do not affect entitlement to element entries
Field Description
EmplID Employee’s ID
HR Responsible ID Employee’s HR
Responsible ID
IN Parameters:
OUT Parameters:
-- -----------------------------------------------------------------------------------
-- Procedure Name : xxhr_job_proc
-- Author's Nam : Mangaiah P
-- Creation Date : 12/20/2007
-- Updated Date : 02/19/2008
-- Purpose : This PACKAGE to load the data employee JOB from staging
table to base tables
-- ------------------------------------------------------------------------------------
PROCEDURE xxhr_assign_proc;
PROCEDURE xxhr_job_proc;
PROCEDURE xxhr_criteria_proc;
END xxhr_job_pkg;
/
PROCEDURE xxhr_assign_proc IS
l_assignment_number number;
l_assignment_id number;
v_special_ceiling_step_id number;
v_object_version_number number;
V_concatenated_segments number;
V_soft_coding_keyflex_id number;
V_comment_id number;
v_effective_start_date date;
v_effective_end_date date;
V_no_managers_warning boolean;
V_other_manager_warning boolean;
v_num number;
v_seg_conc VARCHAR2(2000);
l_change_reason varchar2(50);
l_date_probation_end date;
l_default_code_comb_id number;
l_set_of_books_id number;
G_USER_ID number;
G_LOGIN_ID number;
v_resp_id number;
v_resp_APPL_id number;
v_assignment_id number;
v_org_id number;
l_object_version_number number;
l_effective_date date;
v_job_id NUMBER;
v_job_definition_id NUMBER;
v_business_group_id NUMBER;
v_name VARCHAR2(240);
l_job_id number;
l_job_group_id number;
v_job_code varchar2(20);
l_job_definition_id NUMBER;
v_rec_ccid varchar2(240);
v_group_name varchar2(30);
V_people_group_id number;
V_org_now_no_manager_warning boolean;
V_spp_delete_warning boolean;
V_entries_changed_warning varchar2(2000);
V_tax_district_changed_warning boolean;
counter number := 0;
CURSOR Job_emp Is
SELECT empl_id
,empl_rcd_nbr
,to_char(to_date(effective_date,'dd-mon-rrrr')) effective_date
,effective_sequence
,to_char(to_date(rehire_date,'dd-mon-rrrr')) rehire_date
,to_char(to_date(probation_date,'dd-mon-rrrr')) probation_date
,department
,supervisor_id
,direct_manager_id
,location_code
,reason_code
,action
,salary_grade
,full_or_part_time
,hr_responsible_id
FROM xxhr_job_stg
WHERE empl_id in(SELECT assignment_number
FROM per_all_assignments_f )
AND department in (SELECT flex_value
FROM fnd_flex_values_vl
WHERE flex_value_set_id = 1009636);
BEGIN
G_USER_ID := FND_PROFILE.VALUE('USER_ID');
G_LOGIN_ID := FND_PROFILE.VALUE('LOGIN_ID');
v_org_id := FND_PROFILE.VALUE('ORG_ID');
v_resp_id := FND_PROFILE.VALUE('RESP_ID');
v_resp_APPL_id := FND_PROFILE.VALUE('RESP_APPL_ID');
v_business_group_id := FND_PROFILE.VALUE('PER_BUSINESS_GROUP_ID');
FND_GLOBAL.APPS_INITIALIZE(G_USER_ID,v_resp_id,v_resp_APPL_id);
-- ---------------------------------------------------------------------------------------------------------
-- Validation for assignment id
-- ---------------------------------------------------------------------------------------------------------
SELECT assignment_id
,effective_start_date
,object_version_number
INTO l_assignment_id
,l_effective_date
,l_object_version_number
FROM per_all_assignments_f
WHERE person_id =(SELECT person_id
FROM per_all_people_f
WHERE employee_number = v_job_emp.empl_id);
-- -----------------------------------------------------------------------------------------------------------
-- Validation for set of book id
-- -----------------------------------------------------------------------------------------------------------
SELECT ho.org_information3
INTO l_set_of_books_id
FROM gl_sets_of_books gsb,
hr_organization_information ho
WHERE gsb.set_of_books_id = ho.org_information3
AND ho.org_information_context='Operating Unit Information'
AND ho.ORGANIZATION_ID = v_org_id;
-- ------------------------------------------------------------------------------------------------------------------------
-- Validation for code combination id
-- ------------------------------------------------------------------------------------------------------------------------
v_rec_ccid:= '50001'||'.'||'9475020003'||'.'||
ltrim(rtrim(v_job_emp.department))||'.'||'0000000000'||'.'||'00000'||'.'||'00000';
BEGIN
SELECT fnd_flex_ext.get_ccid
('SQLGL',
' GL#',
50268,
TO_CHAR(SYSDATE,'DD-MON-YYYY'),
v_rec_ccid) --'50001.9475020003.7501.0000000000.00000.00000')
INTO l_default_code_comb_id
FROM dual;
/*if l_default_code_comb_id = 0 then
dbms_output.enable(500000);
hr_assignment_api.update_emp_asg
(p_validate => FALSE
,p_effective_date => l_effective_date
,p_datetrack_update_mode => 'CORRECTION'
,p_object_version_number => l_object_version_number
,p_assignment_number => NULL --l_assignment_number
,p_supervisor_id => NULL
,p_assignment_id => l_assignment_id
,p_default_code_comb_id => l_default_code_comb_id
,p_set_of_books_id => l_set_of_books_id
,p_title => NULL
,p_ass_attribute_category => v_business_group_id
,p_ass_attribute1 => v_job_emp.empl_rcd_nbr
,p_ass_attribute2 =>
fnd_date.date_to_canonical(to_date(v_job_emp.effective_date,'DD-MON-RRRR'))
--v_job_emp.effective_date
,p_ass_attribute3 => v_job_emp.effective_sequence
,p_ass_attribute4 =>
fnd_date.date_to_canonical(to_date(v_job_emp.rehire_date,'DD-MON-RRRR'))
--v_job_emp.rehire_date
,p_ass_attribute5 =>
fnd_date.date_to_canonical(to_date(v_job_emp.probation_date,'DD-MON-RRRR'))
--v_job_emp.probation_date
,p_ass_attribute6 => v_job_emp.department
,p_ass_attribute7 => v_job_emp.supervisor_id
,p_ass_attribute8 => v_job_emp.direct_manager_id
,p_ass_attribute9 => v_job_emp.location_code
,p_ass_attribute10 => v_job_emp.reason_code
,p_ass_attribute11 => v_job_emp.action
,p_ass_attribute12 => v_job_emp.salary_grade
,p_ass_attribute13 => v_job_emp.full_or_part_time
,p_ass_attribute14 => v_job_emp.hr_responsible_id
,p_effective_start_date => v_effective_start_date
,p_effective_end_date => v_effective_end_date
,p_no_managers_warning => v_no_managers_warning
,p_other_manager_warning => v_other_manager_warning
,p_comment_id => V_comment_id
,p_soft_coding_keyflex_id => v_soft_coding_keyflex_id
,p_cagr_grade_def_id => v_num
,p_cagr_concatenated_segments => v_seg_conc
,p_concatenated_segments => V_concatenated_segments
);
commit;
END LOOP;
DBMS_OUTPUT.PUT_LINE('Ex:'||l_object_version_number);
COMMIT;
END xxhr_assign_proc;
PROCEDURE xxhr_job_proc IS
l_set_of_books_id number;
G_USER_ID number;
G_LOGIN_ID number;
v_resp_id number;
v_resp_APPL_id number;
v_org_id number;
v_object_version_number number;
l_effective_date date;
v_job_id NUMBER;
v_job_definition_id NUMBER;
v_business_group_id NUMBER;
v_name VARCHAR2(240);
l_job_id number;
l_job_group_id number;
l_job_definition_id NUMBER;
v_group_name varchar2(30);
v_job_count number;
CURSOR job_emp_code is
SELECT distinct job_code
FROM xxhr_job_stg; --where job_code not in (select name from per_jobs);
BEGIN
G_USER_ID := FND_PROFILE.VALUE('USER_ID');
G_LOGIN_ID := FND_PROFILE.VALUE('LOGIN_ID');
v_org_id := FND_PROFILE.VALUE('ORG_ID');
v_resp_id := FND_PROFILE.VALUE('RESP_ID');
v_resp_APPL_id := FND_PROFILE.VALUE('RESP_APPL_ID');
v_business_group_id :=
FND_PROFILE.VALUE('PER_BUSINESS_GROUP_ID');
FND_GLOBAL.APPS_INITIALIZE(G_USER_ID,v_resp_id,v_resp_APPL_id);
-- ------------------------------------------------------------------------------------------------
-- Open the Cursor for Loop
-- ------------------------------------------------------------------------------------------------
FOR v_job_code IN job_emp_code LOOP
SELECT fnd_flex_ext.get_ccid('PER',
'JOB',
101,
TO_CHAR(SYSDATE, 'DD-MON-YYYY'),
v_job_code.job_code)
INTO v_job_definition_id
FROM dual;
SELECT job_group_id
INTO l_job_group_id
FROM PER_JOB_GROUPS
WHERE master_flag = 'Y';
l_effective_date :=to_date('01-JAN-1990','dd-mon-yyyy');
-- --------------------------------------------------------------------------------------------------
-- Validation for job code
-- --------------------------------------------------------------------------------------------------
if v_job_count > 0
then
dbms_output.enable(500000);
dbms_output.put_line('This job already exists:'||v_job_code.job_code);
else
-----------------------------------------------------------------------------------------------------
--Run the Job API
-----------------------------------------------------------------------------------------------------
hr_job_api.create_job
(p_validate => FALSE
,p_business_group_id => v_business_group_id
,p_date_from => l_effective_date
,p_job_group_id => l_job_group_id
,p_segment1 => v_job_code.job_code
,p_job_id => v_job_id
,p_job_definition_id => v_job_definition_id
,p_object_version_number => v_object_version_number
,p_name => v_name
);
dbms_output.enable(500000);
--------------------------------------------------------------------------------------------------------
-- hr_assignment_api.update_emp_asg_criteria
--------------------------------------------------------------------------------------------------------
PROCEDURE xxhr_criteria_proc IS
l_assignment_id number;
v_special_ceiling_step_id number;
v_object_version_number number;
V_concatenated_segments number;
V_soft_coding_keyflex_id number;
v_effective_start_date date;
v_effective_end_date date;
V_other_manager_warning boolean;
l_set_of_books_id number;
G_USER_ID number;
G_LOGIN_ID number;
v_resp_id number;
v_resp_APPL_id number;
v_org_id number;
l_effective_date date;
l_job_id number;
v_group_name varchar2(30);
V_people_group_id number;
V_org_now_no_manager_warning boolean;
V_spp_delete_warning boolean;
V_entries_changed_warning varchar2(2000);
V_tax_district_changed_warning boolean;
CURSOR job_emp is
SELECT empl_id
,empl_rcd_nbr
,to_char(to_date(effective_date,'dd-mon-rrrr')) effective_date
,effective_sequence
,to_char(to_date(rehire_date,'dd-mon-rrrr')) rehire_date
,to_char(to_date(probation_date,'dd-mon-rrrr')) probation_date
,department
,supervisor_id
,direct_manager_id
,location_code
,reason_code
,action
,salary_grade
,full_or_part_time
,hr_responsible_id
,job_code
FROM xxhr_job_stg WHERE empl_id in(SELECT assignment_number FROM
per_all_assignments_f);
-- --------------------------------------------------------------------------------------------
-- CURSOR for job Code
-- --------------------------------------------------------------------------------------------
BEGIN
G_USER_ID := FND_PROFILE.VALUE('USER_ID');
G_LOGIN_ID := FND_PROFILE.VALUE('LOGIN_ID');
v_org_id := FND_PROFILE.VALUE('ORG_ID');
v_resp_id := FND_PROFILE.VALUE('RESP_ID');
v_resp_APPL_id := FND_PROFILE.VALUE('RESP_APPL_ID');
FND_GLOBAL.APPS_INITIALIZE(G_USER_ID,v_resp_id,v_resp_appl_id);
-- ----------------------------------------------------------------------------------------
-- Validation For Assignment Id
-- ----------------------------------------------------------------------------------------
SELECT assignment_id
,effective_start_date
,object_version_number
INTO l_assignment_id
,l_effective_date
,v_object_version_number
FROM per_all_assignments_f
WHERE person_id =(SELECT person_id
FROM per_all_people_f
WHERE employee_number = v_job_emp.empl_id);
-- -----------------------------------------------------------------------------------------
-- Validation for job code
-- -----------------------------------------------------------------------------------------
SELECT job_id
INTO l_job_id
FROM per_jobs
WHERE name = v_job_emp.job_code;
-- ----------------------------------------------------------------------------------------
-- Update the Assignment Criteria
-- ----------------------------------------------------------------------------------------
hr_assignment_api.update_emp_asg_criteria
(p_validate => FALSE
,p_effective_date => l_effective_date
,p_datetrack_update_mode => 'CORRECTION'
,p_assignment_id => l_assignment_id
,p_object_version_number => v_object_version_number
,p_job_id => l_job_id
,p_special_ceiling_step_id => V_special_ceiling_step_id
,p_group_name => V_group_name
,p_effective_start_date => V_effective_start_date
,p_effective_end_date => V_effective_end_date
,p_people_group_id => V_people_group_id
,p_org_now_no_manager_warning => V_org_now_no_manager_warning
,p_other_manager_warning => V_other_manager_warning
,p_spp_delete_warning => V_spp_delete_warning
,p_entries_changed_warning => V_entries_changed_warning
,p_tax_district_changed_warning => V_tax_district_changed_warning
,p_soft_coding_keyflex_id => V_soft_coding_keyflex_id
,p_concatenated_segments => V_concatenated_segments
);
DBMS_OUTPUT.enable(500000);
DBMS_OUTPUT.PUT_LINE('Assigned the job_id:'||l_job_id);
COMMIT;
END LOOP;
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('Error:'||SQLERRM);
END xxhr_criteria_proc;
END XXHR_JOB_PKG;
/
Field Description
EmplID Employee’s ID
IN Parameters:
OUT Parameters:
-- -----------------------------------------------------------------------------------
-- Procedure Name : xxhr_emp_termination_proc
-- Author's Nam : Sudhakar
-- Creation Date : 12/20/2007
-- Updated Date : 02/19/2008
-- Purpose : This PACKAGE to remove the employee from the database
-- ------------------------------------------------------------------------------------
DECLARE
-- Constant variables
l_module_id CONSTANT VARCHAR2(30) := 'XXFTHR_MIGRATION019';
-- Count Variables
l_count_total NUMBER := 0;
l_count_success NUMBER := 0; -- Total number of successful rows
l_cnt1 NUMBER :=0;
l_errm VARCHAR2(100);
l_err_at_stmt NUMBER;
-- Cursor definitions
CURSOR c_emp_ter IS
SELECT rowid row_id
, employee_number
, lrl_leave_date
, termination_date
, leave_cd1
, lieu_hours_flat
, lieu_hours_prem
, holiday_balhours
, in_lieu_notice_amount
, assignment_id
, person_id
FROM xxft_emp_termination
WHERE record_loaded='V'
ORDER BY employee_number;
--
BEGIN
DBMS_OUTPUT.PUT_LINE('-------------------------------------------------------------------');
DBMS_OUTPUT.PUT_LINE('-- Started Terminate Employees at: '||to_char(SYSDATE,
'DD-MON-RRRR HH24:MI:SS'));
DBMS_OUTPUT.PUT_LINE('--');
UPDATE xxft_emp_termination a
SET person_id = (SELECT person_id
FROM xxft_employee b
WHERE a.employee_number = b.employee_number);
UPDATE xxft_emp_termination a
SET assignment_id = (SELECT assignment_id
FROM xxft_employee b
WHERE a.employee_number = b.employee_number);
-- ************************************************************
-- Start Main Loop
-- ************************************************************
l_err_at_stmt :=10;
l_employee_no := rec.employee_number;
l_person_id := NULL;
l_assignment_id := NULL;
l_last_standard_process_date := last_day(rec.termination_date);
l_obj_no1 := NULL;
--l_obj_no2 := NULL;
l_supervisor_warning := NULL;
l_event_warning := NULL;
l_interview_warning := NULL;
l_review_warning := NULL;
l_recruiter_warning := NULL;
l_asg_future_changes_warning := NULL;
l_entries_changed_warning := NULL;
l_pay_proposal_warning := NULL;
l_dod_warning := NULL;
l_cnt1 := l_cnt1 + 1;
BEGIN
OPEN c_ppos(rec.person_id);
FETCH c_ppos INTO l_ppos_id, l_obj_no1;
IF c_ppos%NOTFOUND THEN
NULL;
END IF;
CLOSE c_ppos;
-- HR_EX_EMPLOYEE_API.ACTUAL_TERMINATION_EMP
-- HR_EX_EMPLOYEE_API.UPDATE_TERM_DETAILS_EMP
-- HR_EX_EMPLOYEE_API.FINAL_PROCESS_EMP
hr_ex_employee_api.actual_termination_emp(
--p_validate => FALSE
p_effective_date => rec.termination_date
,p_period_of_service_id => l_ppos_id
,p_actual_termination_date => rec.termination_date
,p_person_type_id => 6 -- ex employee id
,p_assignment_status_type_id => 3 -- Terminate Assignment status
,p_leaving_reason => rec.leave_cd1
-- OUT
,p_last_standard_process_date => l_last_standard_process_date
,p_object_version_number => l_obj_no1
,p_supervisor_warning => l_supervisor_warning
,p_event_warning => l_event_warning
,p_interview_warning => l_interview_warning
,p_review_warning => l_review_warning
,p_recruiter_warning => l_recruiter_warning
,p_asg_future_changes_warning => l_asg_future_changes_warning
,p_entries_changed_warning => l_entries_changed_warning
,p_pay_proposal_warning => l_pay_proposal_warning
,p_dod_warning => l_dod_warning
);
hr_ex_employee_api.update_term_details_emp
(--p_validate
p_effective_date => rec.termination_date
,p_period_of_service_id => l_ppos_id
--,p_termination_accepted_person
--,p_accepted_termination_date
--,p_comments
--,p_leaving_reason
,p_notified_termination_date => rec.termination_date
,p_projected_termination_date => rec.termination_date
-- OUT
,p_object_version_number => l_obj_no1
);
UPDATE per_all_assignments_f
SET effective_end_date = l_last_standard_process_date
WHERE effective_end_date = to_date ('31-DEC-4712','DD-MON-YYYY')
AND assignment_id = rec.assignment_id;
UPDATE xxft_emp_termination
SET record_loaded = 'Y'
WHERE rowid=rec.row_id;
l_count_success := l_count_success + 1;
EXCEPTION
WHEN OTHERS THEN
l_errm := substr(ltrim(sqlerrm),1,100);
-- dbms_output.put_line(sqlerrm);
UPDATE xxft_emp_termination
SET record_loaded = 'N'
WHERE rowid=rec.row_id;
END;
l_err_at_stmt :=40;
IF l_cnt1>=10 THEN
COMMIT;
l_cnt1:=0;
END IF;
END LOOP;
COMMIT;
DBMS_OUTPUT.PUT_LINE('--');
DBMS_OUTPUT.PUT_LINE('-- Finished Terminate Employees load at: '||
to_char(SYSDATE, 'DD-MON-RRRR HH24:MI:SS'));
DBMS_OUTPUT.PUT_LINE('---------------------------------------------------------------------
-----------');
---------
---------
EXCEPTION
---------
---------
l_error_message := substr(ltrim(sqlerrm),1,100);
l_error_code := sqlcode;