13: l_next_seq number;
14: Begin
15: select bcd.next_seq_num, bcd.seq_num, bcd.calendar_date, bcd.calendar_date + 1
16: into l_next_seq, x_seq, x_start_date, x_end_date
17: from bom_calendar_dates bcd
18: where bcd.calendar_code = l_cal_code and
19: bcd.exception_set_id = -1 and
20: bcd.calendar_date = trunc(p_date);
21:
21:
22: if( x_seq is null) then
23: select bcd.seq_num, bcd.calendar_date, bcd.calendar_date + 1
24: into x_seq, x_start_date, x_end_date
25: from bom_calendar_dates bcd
26: where bcd.calendar_code = l_cal_code and
27: bcd.exception_set_id = -1 and
28: bcd.seq_num = l_next_seq;
29: end if;
1649: /* 24 hour resource */
1650: /*
1651: select bcd.calendar_date
1652: into l_shift_date
1653: from bom_calendar_dates bcd
1654: where bcd.calendar_code = l_cal_code and
1655: bcd.seq_num = p_shift_seq;
1656:
1657: if( l_shift_date < trunc(sysdate) ) then