HRMS Absence Migration
Hi guys today we will explain HRMS Absence Migration
DECLARE p_validate BOOLEAN; p_effective_date DATE; p_person_id NUMBER; p_business_group_id NUMBER; p_absence_attendance_type_id NUMBER; p_abs_attendance_reason_id NUMBER; p_comments LONG; p_date_notification DATE; p_date_projected_start DATE; p_time_projected_start VARCHAR2 (200); p_date_projected_end DATE; p_time_projected_end VARCHAR2 (200); p_date_start DATE; p_time_start VARCHAR2 (200); p_date_end DATE; p_time_end VARCHAR2 (200); p_absence_days NUMBER; p_absence_hours NUMBER; p_authorising_person_id NUMBER; p_replacement_person_id NUMBER; p_attribute_category VARCHAR2 (200); p_attribute1 VARCHAR2 (200); p_attribute2 VARCHAR2 (200); p_attribute3 VARCHAR2 (200); p_attribute4 VARCHAR2 (200); p_attribute5 VARCHAR2 (200); p_attribute6 VARCHAR2 (200); p_attribute7 VARCHAR2 (200); p_attribute8 VARCHAR2 (200); p_attribute9 VARCHAR2 (200); p_attribute10 VARCHAR2 (200); p_attribute11 VARCHAR2 (200); p_attribute12 VARCHAR2 (200); p_attribute13 VARCHAR2 (200); p_attribute14 VARCHAR2 (200); p_attribute15 VARCHAR2 (200); p_attribute16 VARCHAR2 (200); p_attribute17 VARCHAR2 (200); p_attribute18 VARCHAR2 (200); p_attribute19 VARCHAR2 (200); p_attribute20 VARCHAR2 (200); p_period_of_incapacity_id NUMBER; p_ssp1_issued VARCHAR2 (200); p_maternity_id NUMBER; p_sickness_start_date DATE; p_sickness_end_date DATE; p_pregnancy_related_illness VARCHAR2 (200); p_reason_for_notification_dela VARCHAR2 (200); p_accept_late_notification_fla VARCHAR2 (200); p_linked_absence_id NUMBER; p_batch_id NUMBER; <hr class="system-pagebreak" /> p_create_element_entry BOOLEAN; p_abs_information_category VARCHAR2 (200); p_abs_information1 VARCHAR2 (200); p_abs_information2 VARCHAR2 (200); p_abs_information3 VARCHAR2 (200); p_abs_information4 VARCHAR2 (200); p_abs_information5 VARCHAR2 (200); p_abs_information6 VARCHAR2 (200); p_abs_information7 VARCHAR2 (200); p_abs_information8 VARCHAR2 (200); p_abs_information9 VARCHAR2 (200); p_abs_information10 VARCHAR2 (200); p_abs_information11 VARCHAR2 (200); p_abs_information12 VARCHAR2 (200); p_abs_information13 VARCHAR2 (200); p_abs_information14 VARCHAR2 (200); p_abs_information15 VARCHAR2 (200); p_abs_information16 VARCHAR2 (200); p_abs_information17 VARCHAR2 (200); p_abs_information18 VARCHAR2 (200); p_abs_information19 VARCHAR2 (200); p_abs_information20 VARCHAR2 (200); p_abs_information21 VARCHAR2 (200); p_abs_information22 VARCHAR2 (200); p_abs_information23 VARCHAR2 (200); p_abs_information24 VARCHAR2 (200); p_abs_information25 VARCHAR2 (200); p_abs_information26 VARCHAR2 (200); p_abs_information27 VARCHAR2 (200); p_abs_information28 VARCHAR2 (200); p_abs_information29 VARCHAR2 (200); p_abs_information30 VARCHAR2 (200); p_absence_attendance_id NUMBER; p_object_version_number NUMBER; p_occurrence NUMBER; p_dur_dys_less_warning BOOLEAN; p_dur_hrs_less_warning BOOLEAN; p_exceeds_pto_entit_warning BOOLEAN; p_exceeds_run_total_warning BOOLEAN; p_abs_overlap_warning BOOLEAN; p_abs_day_after_warning BOOLEAN; p_dur_overwritten_warning BOOLEAN; v_abs_id NUMBER; v_error VARCHAR2 (3000); CURSOR c1 IS SELECT * FROM XX_unpaid_leave WHERE valid_flag is null AND EMP_NO '10357' and person_id is not null; <hr class="system-pagebreak" /> BEGIN FOR c1_rec IN c1 LOOP p_validate := false; p_effective_date := TO_DATE(C1_REC.DATE_START,'DD/MM/RRRR'); p_person_id := c1_rec.person_id; p_business_group_id := 103; p_absence_attendance_type_id := 68; -- ABS Type ID -- p_abs_attendance_reason_id := c1_rec.RESON_ID; p_comments := NULL; p_date_notification := null; p_date_projected_start := null; p_time_projected_start := NULL; p_date_projected_end := null; p_time_projected_end := NULL; p_date_start := TO_DATE(C1_REC.DATE_START,'DD/MM/RRRR'); p_time_start := NULL; p_date_end := TO_DATE(C1_REC.DATE_END,'DD/MM/RRRR'); p_time_end := NULL; p_absence_days := NULL; p_absence_hours := NULL; p_authorising_person_id := NULL; p_replacement_person_id := NULL; p_attribute_category := NULL; p_attribute1 := null; p_attribute2 := C1_REC.ABS_NO; p_attribute3 := NULL; p_attribute4 := NULL; p_attribute5 := NULL; p_attribute6 := NULL; p_attribute7 := NULL; p_attribute8 := NULL; p_attribute9 := NULL; p_attribute10 := NULL; p_attribute11 := NULL; p_attribute12 := NULL; p_attribute13 := NULL; p_attribute14 := NULL; p_attribute15 := NULL; p_attribute16 := NULL; p_attribute17 := NULL; p_attribute18 := NULL; p_attribute19 := NULL; p_attribute20 := NULL; p_period_of_incapacity_id := NULL; p_ssp1_issued := 'N'; p_maternity_id := NULL; p_sickness_start_date := NULL; p_sickness_end_date := NULL; p_pregnancy_related_illness := 'N'; p_reason_for_notification_dela:= NULL; p_accept_late_notification_fla:= 'N'; p_linked_absence_id := NULL; p_batch_id := NULL; p_create_element_entry := TRUE; --================================================== <hr class="system-pagebreak" /> p_abs_information_category := NULL; p_abs_information1 := NULL; p_abs_information2 := NULL; p_abs_information3 := NULL; p_abs_information4 := NULL; p_abs_information5 := NULL; p_abs_information6 := NULL; p_abs_information7 := NULL; p_abs_information8 := NULL; p_abs_information9 := NULL; p_abs_information10 := NULL; p_abs_information11 := NULL; p_abs_information12 := NULL; p_abs_information13 := NULL; p_abs_information14 := NULL; p_abs_information15 := NULL; p_abs_information16 := NULL; p_abs_information17 := NULL; p_abs_information18 := NULL; p_abs_information19 := NULL; p_abs_information20 := NULL; p_abs_information21 := NULL; p_abs_information22 := NULL; p_abs_information23 := NULL; p_abs_information24 := NULL; p_abs_information25 := NULL; p_abs_information26 := NULL; p_abs_information27 := NULL; p_abs_information28 := NULL; p_abs_information29 := NULL; p_abs_information30 := NULL; p_absence_attendance_id := NULL; p_object_version_number := NULL; p_occurrence := NULL; p_dur_dys_less_warning := NULL; p_dur_hrs_less_warning := NULL; p_exceeds_pto_entit_warning := NULL; p_exceeds_run_total_warning := NULL; p_abs_overlap_warning := NULL; p_abs_day_after_warning := NULL; p_dur_overwritten_warning := NULL; <hr class="system-pagebreak" /> BEGIN apps.hr_person_absence_api.create_person_absence (p_validate, p_effective_date, p_person_id, p_business_group_id, p_absence_attendance_type_id, p_abs_attendance_reason_id, p_comments, p_date_notification, p_date_projected_start, p_time_projected_start, p_date_projected_end, p_time_projected_end, p_date_start, p_time_start, p_date_end, p_time_end, p_absence_days, p_absence_hours, p_authorising_person_id, p_replacement_person_id, p_attribute_category, p_attribute1, p_attribute2, p_attribute3, p_attribute4, p_attribute5, p_attribute6, p_attribute7, p_attribute8, p_attribute9, p_attribute10, p_attribute11, p_attribute12, p_attribute13, p_attribute14, p_attribute15, p_attribute16, p_attribute17, p_attribute18, p_attribute19, p_attribute20, p_period_of_incapacity_id, p_ssp1_issued, p_maternity_id, p_sickness_start_date, p_sickness_end_date, p_pregnancy_related_illness, p_reason_for_notification_dela, p_accept_late_notification_fla, p_linked_absence_id, p_batch_id, p_create_element_entry, p_abs_information_category, p_abs_information1, p_abs_information2, p_abs_information3, p_abs_information4, p_abs_information5, p_abs_information6, p_abs_information7, p_abs_information8, p_abs_information9, p_abs_information10, p_abs_information11, p_abs_information12, p_abs_information13, p_abs_information14, p_abs_information15, p_abs_information16, p_abs_information17, p_abs_information18, p_abs_information19, p_abs_information20, p_abs_information21, p_abs_information22, p_abs_information23, p_abs_information24, p_abs_information25, p_abs_information26, p_abs_information27, p_abs_information28, p_abs_information29, p_abs_information30, p_absence_attendance_id, p_object_version_number, p_occurrence, p_dur_dys_less_warning, p_dur_hrs_less_warning, p_exceeds_pto_entit_warning, p_exceeds_run_total_warning, p_abs_overlap_warning, p_abs_day_after_warning, p_dur_overwritten_warning ); <hr class="system-pagebreak" /> COMMIT; UPDATE XX_unpaid_leave SET valid_flag = 'DONE' WHERE person_id = c1_rec.person_id and DATE_START = c1_rec.DATE_START; COMMIT; EXCEPTION WHEN OTHERS THEN v_error := SQLERRM; UPDATE XX_unpaid_leave SET valid_flag = 'ERROR', error_msg = v_error WHERE person_id = c1_rec.person_id and DATE_START = c1_rec.DATE_START; END; END LOOP; END;
Tag:Absence Migration, HRMS, Migration