2 Replies Latest reply on Feb 14, 2013 3:30 PM by 931002

    Absence overlap

      We have a requirement to allow overlapping absences. I have defined two different types of absences; Vacation and Flex. Both have accrual plans and I want to allow absence overlapping functionality for these. When I created these absences, I selected the radio button option as 'Yes' for Allow Absence overlap.

      When I enter two different absences with the same dates as below, I am getting a message that the dates are overlapping.

      Type:Vacation Absence
      Start date 13-feb-2013
      End Date 13-Feb-2013
      Absence Additional Details (ABS_INFORMATION3) = Half Day
      Saved successfully

      Type: Flex Absence
      Start Date 13-Feb-2013
      End Date 13-feb-2013
      Absence Additional Details (ABS_INFORMATION3) = Half Day
      Unable to save as I am getting an error message that the dates are overlapping. Shouldn't the system allow this when I select the Allow option for absence overlap?

      The reason why we want to allow this is we have a policy where employees can take half day absence. They can take two half days on the same day with two different absence types.

      Is there a better way to address this requirement?
      Thanks a lot for your help..

        • 1. Re: Absence overlap
          My assumption was that it would warn you but still save.
          But why not create hourly leave instead (based on hours not days)? Half day would be 4 hours based on 8 hour workday.

          I wrote a function to check hourly absence overlaps as well which you can use in your bg_absence_duration_formula.

          p_assignment_id in number,
          p_start_date in date,
          p_time_start in varchar2,
          p_time_end in varchar2)
          return varchar2
          v_overlap_flag varchar2(500) := 'N';
          v_overlap_count number := 0;
          v_time_start_dec number := 0;
          v_time_end_dec number := 0;
          -- get time start and time end as decimals
          ((to_number(substr(p_time_start,1,2))*60 + to_number(substr(p_time_start,4,2)))/60),
          ((to_number(substr(p_time_end,1,2))*60 + to_number(substr(p_time_end,4,2)))/60)
          into v_time_start_dec, v_time_end_dec
          from dual;
          when others then
          return 'N';
          -- find absence
          select count(paa.absence_attendance_id)
          into v_overlap_count
          from per_absence_attendances paa, per_absence_attendance_types paat,
          per_all_assignments_f paaf
          where paa.absence_attendance_type_id = paat.absence_attendance_type_id
          and paa.person_id = paaf.person_id
          and paaf.assignment_id = p_assignment_id
          and p_start_date between paaf.effective_start_date and paaf.effective_end_date
          /* check if absence time start and time end are in between */
          and (p_start_date <= paa.date_end and p_start_date >= paa.date_start)
          and ( (v_time_start_dec between ((to_number(substr(paa.time_start,1,2))*60 + to_number(substr(paa.time_start,4,2)))/60)
          and ((to_number(substr(paa.time_end,1,2))*60 + to_number(substr(paa.time_end,4,2)))/60))
          or (v_time_end_dec between ((to_number(substr(paa.time_start,1,2))*60 + to_number(substr(paa.time_start,4,2)))/60)
          and ((to_number(substr(paa.time_end,1,2))*60 + to_number(substr(paa.time_end,4,2)))/60))
          when no_data_found then
          v_overlap_count := 0;
          when others then
          v_overlap_count := 0;
          -- if no overlaps found
          if (v_overlap_count = 0) then
          v_overlap_flag := 'N';
          v_overlap_flag := 'Y';
          end if;
          -- return flag
          return v_overlap_flag;
          1 person found this helpful
          • 2. Re: Absence overlap
            Thanks igwe.

            For some reason, absence overlap feature is not working even if I select that while defining the absences. I tried lots of options but still no positive outcome.
            I have logged an SR with Oracle to see what they have to say.