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 4599: l_temp_date := mrp_calendar.date_offset(

4595: else
4596: -- find out the schedule start_date based on the offset
4597: -- first, we find out the offset date and then use MOD function
4598: -- to find out the offset time
4599: l_temp_date := mrp_calendar.date_offset(
4600: p_org_id,
4601: 1, -- daily bucket
4602: l_completion_date,
4603: -ceil(l_lead_time/l_working_time));

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

4672: -- l_date and l_time to store the possible start date and time
4673:
4674: -- get the first workday. If it's not the same as p_start_date, need
4675: -- to move it to next workday and also set the l_time to start of line
4676: l_date := mrp_calendar.next_work_day(p_org_id,1,p_start_date);
4677: if (trunc(l_start_date) <> trunc(l_date)) then
4678: l_time := l_line_start_time;
4679: else
4680: l_time := l_start_time;

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

4689: -- line start time of the day.
4690: -- If it's between start and end time of line, use up the line and
4691: -- move to next workday.
4692: if (l_time > l_line_end_time) then
4693: l_date := mrp_calendar.next_work_day(p_org_id,1,l_date+1);
4694: l_time := l_line_start_time;
4695: elsif (l_time < l_line_start_time) then
4696: l_time := l_line_start_time;
4697: else

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

4697: else
4698: l_remain_time := l_line_end_time-l_time;
4699: if (l_lead_time - l_remain_time > 0) then
4700: l_lead_time := l_lead_time - l_remain_time;
4701: l_date := mrp_calendar.next_work_day(p_org_id,1,l_date+1);
4702: l_time := l_line_start_time;
4703: end if;
4704: end if;
4705:

Line 4715: l_date := mrp_calendar.date_offset(

4711: l_offset_time := l_time + mod(l_lead_time, l_working_time);
4712: l_offset_day := floor(l_lead_time/l_working_time);
4713: end if;
4714:
4715: l_date := mrp_calendar.date_offset(
4716: p_org_id,
4717: 1, -- daily bucket
4718: l_date,
4719: l_offset_day);

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

4719: l_offset_day);
4720:
4721:
4722: if (l_offset_time = l_line_start_time and l_fixed_time <> 0) then
4723: l_date := mrp_calendar.prev_work_day(p_org_id,1,l_date-1);
4724: l_offset_time := l_line_end_time;
4725: end if;
4726:
4727: return ( l_date + l_offset_time/86400 );