DBA Data[Home] [Help]

APPS.MRP_LINE_SCHEDULE_ALGORITHM dependencies on MRP_CALENDAR

Line 156: v_days_out := mrp_calendar.DAYS_BETWEEN(p_org_id,1,sysdate,to_date(p_date,'J'));

152: v_fence_days NUMBER;
153: v_tol_percent NUMBER;
154: BEGIN
155:
156: v_days_out := mrp_calendar.DAYS_BETWEEN(p_org_id,1,sysdate,to_date(p_date,'J'));
157:
158: select nvl(max(FENCE_DAYS),-1)
159: into v_fence_days
160: from bom_resource_flex_fences

Line 4593: l_temp_date := mrp_calendar.date_offset(

4589: else
4590: -- find out the schedule start_date based on the offset
4591: -- first, we find out the offset date and then use MOD function
4592: -- to find out the offset time
4593: l_temp_date := mrp_calendar.date_offset(
4594: p_org_id,
4595: 1, -- daily bucket
4596: l_completion_date,
4597: -ceil(l_lead_time/l_working_time));

Line 4669: l_date := mrp_calendar.next_work_day(p_org_id,1,p_start_date);

4665: -- l_date and l_time to store the possible start date and time
4666:
4667: -- get the first workday. If it's not the same as p_start_date, need
4668: -- to move it to next workday and also set the l_time to start of line
4669: l_date := mrp_calendar.next_work_day(p_org_id,1,p_start_date);
4670: if (trunc(l_start_date) <> trunc(l_date)) then
4671: l_time := l_line_start_time;
4672: else
4673: l_time := l_start_time;

Line 4686: l_date := mrp_calendar.next_work_day(p_org_id,1,l_date+1);

4682: -- line start time of the day.
4683: -- If it's between start and end time of line, use up the line and
4684: -- move to next workday.
4685: if (l_time > l_line_end_time) then
4686: l_date := mrp_calendar.next_work_day(p_org_id,1,l_date+1);
4687: l_time := l_line_start_time;
4688: elsif (l_time < l_line_start_time) then
4689: l_time := l_line_start_time;
4690: else

Line 4694: l_date := mrp_calendar.next_work_day(p_org_id,1,l_date+1);

4690: else
4691: l_remain_time := l_line_end_time-l_time;
4692: if (l_lead_time - l_remain_time > 0) then
4693: l_lead_time := l_lead_time - l_remain_time;
4694: l_date := mrp_calendar.next_work_day(p_org_id,1,l_date+1);
4695: l_time := l_line_start_time;
4696: end if;
4697: end if;
4698:

Line 4708: l_date := mrp_calendar.date_offset(

4704: l_offset_time := l_time + mod(l_lead_time, l_working_time);
4705: l_offset_day := floor(l_lead_time/l_working_time);
4706: end if;
4707:
4708: l_date := mrp_calendar.date_offset(
4709: p_org_id,
4710: 1, -- daily bucket
4711: l_date,
4712: l_offset_day);

Line 4716: l_date := mrp_calendar.prev_work_day(p_org_id,1,l_date-1);

4712: l_offset_day);
4713:
4714:
4715: if (l_offset_time = l_line_start_time and l_fixed_time <> 0) then
4716: l_date := mrp_calendar.prev_work_day(p_org_id,1,l_date-1);
4717: l_offset_time := l_line_end_time;
4718: end if;
4719:
4720: return ( l_date + l_offset_time/86400 );