DBA Data[Home] [Help]

APPS.MSC_SNAPSHOT_PK dependencies on MSC_PLANS

Line 104: FROM msc_plans

100: Nvl(weekly_cutoff_bucket,0)*7,
101: Nvl(period_cutoff_bucket,0)
102: INTO l_min_cutoff_bucket, l_hour_cutoff_bucket,
103: l_daily_cutoff_bucket, l_weekly_cutoff_bucket, l_period_cutoff_bucket
104: FROM msc_plans
105: WHERE plan_id = p_plan_id;
106: ELSE
107: l_min_cutoff_bucket := p_min_cutoff_bucket;
108: l_hour_cutoff_bucket := p_hour_cutoff_bucket;

Line 292: msc_plans mpl

288: TRUNC(sysdate),
289: mpl.cutoff_date
290: FROM
291: msc_trading_partners mtp,
292: msc_plans mpl
293: WHERE
294: mpl.plan_id = p_plan_id
295: and mpl.organization_id = mtp.sr_tp_id
296: and mtp.partner_type = 3

Line 348: FROM msc_plans

344: SELECT decode(plan_type, 4, trunc(curr_start_date), 9,
345: trunc(curr_start_date), trunc(sysdate)),
346: weekly_cutoff_bucket
347: into l_curr_start_date, l_weekly_buckets
348: FROM msc_plans
349: WHERE plan_id = p_plan_id;
350:
351:
352: IF l_curr_start_date < l_plan_start_date THEN

Line 469: UPDATE msc_plans

465: LOG_MESSAGE(' period = '||l_period_cutoff_date);
466: END IF;
467: */
468: -- Set the cutoff_date of the plan based period, week, day buckets set
469: UPDATE msc_plans
470: SET curr_cutoff_date = l_plan_cutoff_date,
471: curr_start_date = l_curr_start_date
472: WHERE plan_id = p_plan_id;
473:

Line 477: FROM msc_plans

473:
474:
475: SELECT Nvl(min_cutoff_bucket,0), Nvl(hour_cutoff_bucket,0)+Nvl(min_cutoff_bucket,0)
476: INTO p_min_cutoff_bucket, p_hour_cutoff_bucket
477: FROM msc_plans
478: WHERE plan_id = p_plan_id;
479:
480: -- select bucket reference calendar
481: select nvl(fnd_profile.value('MSC_BKT_REFERENCE_CALENDAR'), tp.calendar_code),

Line 485: from msc_plans mp,

481: select nvl(fnd_profile.value('MSC_BKT_REFERENCE_CALENDAR'), tp.calendar_code),
482: tp.calendar_exception_set_id ,
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

Line 716: from msc_plans

712: /*
713: BEGIN
714: select nvl(global_fcst_refresh_date, to_date('01-JAN-1900','dd-mon-yyyy'))
715: into last_gf_refresh_date
716: from msc_plans
717: where plan_id = p_plan_id;
718:
719: EXCEPTION WHEN OTHERS THEN
720: RETCODE := G_ERROR;

Line 746: msc_plans mp

742: l_latest_change_date := NULL;
743: BEGIN
744: select max(msa.last_update_date) into l_latest_change_date
745: from msc_sr_assignments msa,
746: msc_plans mp
747: where mp.plan_id = p_plan_id
748: and mp.FORECAST_ASSIGNMENT_SET_ID = msa.assignment_set_id;
749: EXCEPTION WHEN OTHERS THEN
750: RETCODE := G_ERROR;

Line 766: msc_plans mp

762: BEGIN
763: select max(msr.last_update_date) into l_latest_change_date
764: from msc_sourcing_rules msr,
765: msc_sr_assignments msra,
766: msc_plans mp
767: where mp.plan_id = p_plan_id
768: and mp.FORECAST_ASSIGNMENT_SET_ID = msra.ASSIGNMENT_SET_ID
769: and msra.sourcing_rule_id = msr.sourcing_rule_id;
770: EXCEPTION WHEN OTHERS THEN

Line 1108: from msc_plans

1104:
1105: IF p_plan_so > 0 THEN
1106: select decode(curr_plan_type,1,1,2,1,3,1,0)
1107: into lv_p_plan_type
1108: from msc_plans
1109: where plan_id = p_plan_id;
1110:
1111: IF lv_p_plan_type = 0 THEN
1112: lv_p_plan_so := 1;

Line 1121: from msc_plans

1117: decode(WEEKLY_RESOURCE_CONSTRAINTS,1,1,
1118: decode(PERIOD_MATERIAL_CONSTRAINTS,1,1,
1119: decode(PERIOD_RESOURCE_CONSTRAINTS,1,1,0))))))
1120: into lv_p_plan_so
1121: from msc_plans
1122: where plan_id = p_plan_id;
1123:
1124: IF lv_p_plan_so = 1 THEN
1125: select decode(optimize_flag,1,1,

Line 1129: from msc_plans

1125: select decode(optimize_flag,1,1,
1126: decode(nvl(fnd_profile.value('MSO_ENABLE_DECISION_RULES'),'N'),
1127: 'Y',1,'Yes',1,'YES',1,0))
1128: into lv_p_plan_so
1129: from msc_plans
1130: where plan_id = p_plan_id;
1131:
1132: IF lv_p_plan_so = 1 THEN
1133: lv_p_plan_so := 1;

Line 1170: msc_plans mp

1166: WHERE location_source = 'HZ'
1167: and region_id is not null
1168: and region_id in ( select distinct msa.region_id
1169: from msc_sr_assignments msa,
1170: msc_plans mp
1171: where msa.assignment_type in (7,8,9)
1172: and mp.plan_id = p_plan_id
1173: and msa.assignment_set_id = mp.curr_assignment_set_id
1174: )

Line 1196: msc_plans mp

1192: and c.region_id is not null
1193: and c.location_source = 'HZ'
1194: and a.region_id in ( select distinct msa.region_id
1195: from msc_sr_assignments msa,
1196: msc_plans mp
1197: where msa.assignment_type in (7,8,9)
1198: and mp.plan_id = p_plan_id
1199: and msa.assignment_set_id = mp.curr_assignment_set_id
1200: )

Line 1399: FROM msc_plans

1395: BEGIN
1396:
1397: SELECT Nvl(min_cutoff_bucket,0), Nvl(hour_cutoff_bucket,0)
1398: INTO p_min_cutoff_bucket,p_hour_cutoff_bucket
1399: FROM msc_plans
1400: WHERE plan_id = p_plan_id;
1401:
1402: --LOG_MESSAGE(' 1 : '||p_min_cutoff_bucket||' '||p_hour_cutoff_bucket);
1403:

Line 1448: from msc_plans

1444: if p_daily_cutoff_bucket = 0
1445: then
1446: select nvl(curr_start_date-1, TRUNC(SYSDATE-1))
1447: INTO l_daily_cutoff_date
1448: from msc_plans
1449: where plan_id = p_plan_id;
1450: end if;
1451:
1452:

Line 2111: from msc_system_items items, msc_item_categories cat, msc_plans plans

2107: select items.inventory_item_id,
2108: cat.organization_id,
2109: cat.sr_instance_id,
2110: cat.sr_category_id
2111: from msc_system_items items, msc_item_categories cat, msc_plans plans
2112: where cat.CATEGORY_SET_ID = plans.CATEGORY_SET_ID
2113: and cat.inventory_item_id = items.inventory_item_id
2114: and cat.sr_instance_id = items.sr_instance_id
2115: and cat.organization_id = items.organization_id