DECLARE
l_absence_attendance_id NUMBER;
l_object_version_number NUMBER;
l_occurrence NUMBER;
l_dur_dys_less_warning BOOLEAN;
l_dur_hrs_less_warning BOOLEAN;
l_exceeds_pto_entit_warning BOOLEAN;
l_exceeds_run_total_warning BOOLEAN;
l_abs_overlap_warning BOOLEAN;
l_abs_day_after_warning BOOLEAN;
l_dur_overwritten_warning BOOLEAN;
l_absence_days NUMBER := NULL;
l_absence_hours NUMBER := NULL;
BEGIN
HR_PERSON_ABSENCE_API.create_person_absence (
p_validate => FALSE,
p_effective_date => SYSDATE,
p_person_id => <PERSON_ID>,
p_business_group_id => <BUSINESS_GROUP_ID>,
p_absence_attendance_type_id => <ATTENDANCE_TYPE_ID>,
p_abs_attendance_reason_id => NULL,
p_comments => NULL,
p_date_start => TO_DATE ('01-JUN-2012', 'DD-MON-YYYY')
,
p_date_end => TO_DATE ('01-JUN-2012', 'DD-MON-YYYY')
,
p_absence_days => l_absence_days,
p_absence_hours => l_absence_hours,
p_attribute_category => 'Annual Leave', -- Absence Type
p_attribute1 => NULL,
p_attribute2 => NULL,
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 => 'N',
p_attribute13 => 'N',
p_attribute14 => NULL,
p_attribute15 => NULL,
p_attribute16 => 'No',
p_attribute17 => NULL,
p_attribute18 => NULL,
p_attribute19 => NULL,
p_attribute20 => NULL,
p_absence_attendance_id => l_absence_attendance_id,
p_object_version_number => l_object_version_number,
p_occurrence => l_occurrence,
p_dur_dys_less_warning => l_dur_dys_less_warning,
p_dur_hrs_less_warning => l_dur_hrs_less_warning,
p_exceeds_pto_entit_warning => l_exceeds_pto_entit_warning,
p_exceeds_run_total_warning => l_exceeds_run_total_warning,
p_abs_overlap_warning => l_abs_overlap_warning,
p_abs_day_after_warning => l_abs_day_after_warning,
p_dur_overwritten_warning => l_dur_overwritten_warning
);
COMMIT;
END;
from where to get the p_attribute_category value ?
ReplyDeleteSELECT ppg.segment2
ReplyDeleteINTO p_attribute_category
FROM pay_people_groups ppg,
per_all_people_f papf,
per_all_assignments_f paaf
WHERE papf.person_id = paaf.person_id
AND paaf.people_group_id = ppg.people_group_id
AND papf.current_employee_flag = 'Y'
AND paaf.primary_flag = 'Y'
AND TO_DATE (l_abs_start_date) BETWEEN papf.effective_start_date
AND papf.effective_end_date
AND TO_DATE (l_abs_start_date) BETWEEN paaf.effective_start_date
AND paaf.effective_end_date
AND papf.person_id = p_person_id;