DBA Data[Home] [Help]

APPS.MSC_SNAPSHOT_PK dependencies on MSC_CALENDAR

Line 167: msc_calendar.next_work_day(-1*p_org_id,

163:
164:
165: IF l_weekly_cutoff_bucket <> 0 THEN
166: p_daily_cutoff_date :=
167: msc_calendar.next_work_day(-1*p_org_id,
168: p_instance_id,
169: msc_calendar.type_weekly_bucket,
170: l_bucket_end_date + 1
171: );

Line 169: msc_calendar.type_weekly_bucket,

165: IF l_weekly_cutoff_bucket <> 0 THEN
166: p_daily_cutoff_date :=
167: msc_calendar.next_work_day(-1*p_org_id,
168: p_instance_id,
169: msc_calendar.type_weekly_bucket,
170: l_bucket_end_date + 1
171: );
172:
173: p_daily_cutoff_date := p_daily_cutoff_date -1;

Line 183: msc_calendar.next_work_day(-1*p_org_id,

179: --LOG_MESSAGE('p_daily_cutoff_date #1 = '||p_daily_cutoff_date||' org '||p_org_id||' inst '||p_instance_id||' l_bucket_end_date '||l_bucket_end_date);
180: END IF;
181: ELSIF l_period_cutoff_bucket <> 0 THEN
182: p_daily_cutoff_date :=
183: msc_calendar.next_work_day(-1*p_org_id,
184: p_instance_id,
185: msc_calendar.type_monthly_bucket,
186: l_bucket_end_date + 1
187: );

Line 185: msc_calendar.type_monthly_bucket,

181: ELSIF l_period_cutoff_bucket <> 0 THEN
182: p_daily_cutoff_date :=
183: msc_calendar.next_work_day(-1*p_org_id,
184: p_instance_id,
185: msc_calendar.type_monthly_bucket,
186: l_bucket_end_date + 1
187: );
188: p_daily_cutoff_date := p_daily_cutoff_date -1;
189: -- The above call gives the period start date after l_bucket_end_date

Line 221: msc_calendar.next_work_day(-1*p_org_id,

217:
218: IF l_period_cutoff_bucket <> 0 THEN
219: -- This needs to be changed to be TYPE_PERIOD_BUCKET instead of months
220: p_weekly_cutoff_date :=
221: msc_calendar.next_work_day(-1*p_org_id,
222: p_instance_id,
223: msc_calendar.type_monthly_bucket,
224: l_bucket_end_date + 1
225: );

Line 223: msc_calendar.type_monthly_bucket,

219: -- This needs to be changed to be TYPE_PERIOD_BUCKET instead of months
220: p_weekly_cutoff_date :=
221: msc_calendar.next_work_day(-1*p_org_id,
222: p_instance_id,
223: msc_calendar.type_monthly_bucket,
224: l_bucket_end_date + 1
225: );
226:
227: p_weekly_cutoff_date := p_weekly_cutoff_date -1;

Line 250: msc_calendar.next_work_day(-1*p_org_id,

246: END IF;
247:
248: FOR j IN 1..l_period_cutoff_bucket loop
249: p_period_cutoff_date :=
250: msc_calendar.next_work_day(-1*p_org_id,
251: p_instance_id,
252: msc_calendar.type_monthly_bucket,
253: l_bucket_end_date + 1
254: );

Line 252: msc_calendar.type_monthly_bucket,

248: FOR j IN 1..l_period_cutoff_bucket loop
249: p_period_cutoff_date :=
250: msc_calendar.next_work_day(-1*p_org_id,
251: p_instance_id,
252: msc_calendar.type_monthly_bucket,
253: l_bucket_end_date + 1
254: );
255: l_bucket_end_date := p_period_cutoff_date;
256: IF mrdebug = TRUE THEN

Line 359: msc_calendar_dates mc

355: select min(cal.week_start_date)
356: into l_curr_start_date
357: from msc_cal_week_start_dates cal,
358: msc_trading_partners tp,
359: msc_calendar_dates mc
360: where cal.exception_set_id = tp.calendar_exception_set_id
361: and mc.exception_set_id = tp.calendar_exception_set_id
362: and cal.calendar_code = tp.calendar_code
363: and mc.calendar_code = tp.calendar_code

Line 375: msc_calendar_dates mc

371: ELSE
372: select min(cal.week_start_date)
373: into l_curr_start_date
374: from msc_cal_week_start_dates cal,
375: msc_calendar_dates mc
376: where cal.exception_set_id = mc.exception_set_id
377: and cal.calendar_code = mc.calendar_code
378: and cal.sr_instance_id = mc.sr_instance_id
379: and cal.week_start_date >= mc.next_date

Line 415: from msc_calendar_dates

411:
412: IF (lv_bkt_ref_calendar is not null) then
413: select sr_instance_id
414: into lv_bkt_ref_instance
415: from msc_calendar_dates
416: where calendar_code = lv_bkt_ref_calendar
417: and calendar_date = trunc(sysdate)
418: and exception_set_id = -1;
419:

Line 487: msc_calendar_dates mcd

483: decode(fnd_profile.value('MSC_BKT_REFERENCE_CALENDAR'), NULL, tp.sr_instance_id, mcd.sr_instance_id)
484: into m_calendar_code , m_cal_exception_set_id , m_sr_instance_id
485: from msc_plans mp,
486: msc_trading_partners tp,
487: msc_calendar_dates mcd
488: where mp.plan_id = p_plan_id
489: and tp.partner_type = 3
490: and tp.sr_instance_id = mp.sr_instance_id
491: and mp.organization_id = tp.sr_tp_id

Line 512: MSC_CALENDAR_DATES cal

508: l_msc_plan_buckets.bkt_end_date,
509: l_msc_plan_buckets.bucket_type,
510: l_msc_plan_buckets.days_in_bkt
511: FROM
512: MSC_CALENDAR_DATES cal
513: WHERE
514: cal.sr_instance_id = m_sr_instance_id
515: AND cal.calendar_code = m_calendar_code
516: AND cal.exception_set_id = m_cal_exception_set_id

Line 1634: from msc_calendar_dates cal1,

1630: END IF;
1631:
1632: select to_number(to_char(cal2.calendar_date,'J'))
1633: into l_calendar_date
1634: from msc_calendar_dates cal1,
1635: msc_calendar_dates cal2
1636: where cal1.calendar_code = p_calendar_code
1637: and cal1.calendar_date = to_date(l_bkt_end_date3,'J')
1638: and cal1.exception_set_id = -1

Line 1635: msc_calendar_dates cal2

1631:
1632: select to_number(to_char(cal2.calendar_date,'J'))
1633: into l_calendar_date
1634: from msc_calendar_dates cal1,
1635: msc_calendar_dates cal2
1636: where cal1.calendar_code = p_calendar_code
1637: and cal1.calendar_date = to_date(l_bkt_end_date3,'J')
1638: and cal1.exception_set_id = -1
1639: and cal1.sr_instance_id = p_ss_instance_id

Line 1648: msc_calendar_dates cal1,

1644: ELSE
1645: select to_number(to_char(cal2.calendar_date,'J'))
1646: into l_calendar_date
1647: from msc_plan_buckets org_bkt,
1648: msc_calendar_dates cal1,
1649: msc_calendar_dates cal2
1650: where org_bkt.plan_id = p_plan_id
1651: and org_bkt.organization_id = p_owning_org_id
1652: and org_bkt.sr_instance_id = p_owning_instance_id

Line 1649: msc_calendar_dates cal2

1645: select to_number(to_char(cal2.calendar_date,'J'))
1646: into l_calendar_date
1647: from msc_plan_buckets org_bkt,
1648: msc_calendar_dates cal1,
1649: msc_calendar_dates cal2
1650: where org_bkt.plan_id = p_plan_id
1651: and org_bkt.organization_id = p_owning_org_id
1652: and org_bkt.sr_instance_id = p_owning_instance_id
1653: and org_bkt.curr_flag = 1

Line 1709: msc_calendar_dates cal1

1705: select to_number(to_char(cal1.prior_date,'J'))
1706: into l_calendar_date
1707: from msc_plan_buckets own_org_bkt,
1708: msc_plan_buckets org_bkt,
1709: msc_calendar_dates cal1
1710: where own_org_bkt.plan_id = p_plan_id
1711: and own_org_bkt.organization_id = p_owning_org_id
1712: and own_org_bkt.sr_instance_id = p_owning_instance_id
1713: and own_org_bkt.curr_flag = 1

Line 1731: msc_calendar_dates cal1

1727: ELSE
1728: select to_number(to_char(cal1.next_date,'J'))
1729: into l_calendar_date
1730: from msc_plan_buckets org_bkt,
1731: msc_calendar_dates cal1
1732: where org_bkt.plan_id = p_plan_id
1733: and org_bkt.organization_id = p_owning_org_id
1734: and org_bkt.sr_instance_id = p_owning_instance_id
1735: and org_bkt.curr_flag = 1