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 468: UPDATE msc_plans

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

Line 476: FROM msc_plans

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

Line 484: from msc_plans mp,

480: select nvl(fnd_profile.value('MSC_BKT_REFERENCE_CALENDAR'), tp.calendar_code),
481: tp.calendar_exception_set_id ,
482: decode(fnd_profile.value('MSC_BKT_REFERENCE_CALENDAR'), NULL, tp.sr_instance_id, mcd.sr_instance_id)
483: into m_calendar_code , m_cal_exception_set_id , m_sr_instance_id
484: from msc_plans mp,
485: msc_trading_partners tp,
486: msc_calendar_dates mcd
487: where mp.plan_id = p_plan_id
488: and tp.partner_type = 3

Line 714: from msc_plans

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

Line 744: msc_plans mp

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

Line 764: msc_plans mp

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

Line 1106: from msc_plans

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

Line 1119: from msc_plans

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

Line 1127: from msc_plans

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

Line 1168: msc_plans mp

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

Line 1194: msc_plans mp

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

Line 1373: FROM msc_plans

1369: BEGIN
1370:
1371: SELECT Nvl(min_cutoff_bucket,0), Nvl(hour_cutoff_bucket,0)
1372: INTO p_min_cutoff_bucket,p_hour_cutoff_bucket
1373: FROM msc_plans
1374: WHERE plan_id = p_plan_id;
1375:
1376: --LOG_MESSAGE(' 1 : '||p_min_cutoff_bucket||' '||p_hour_cutoff_bucket);
1377:

Line 1422: from msc_plans

1418: if p_daily_cutoff_bucket = 0
1419: then
1420: select nvl(curr_start_date-1, TRUNC(SYSDATE-1))
1421: INTO l_daily_cutoff_date
1422: from msc_plans
1423: where plan_id = p_plan_id;
1424: end if;
1425:
1426: