DBA Data[Home] [Help]

APPS.MSD_VALIDATE_DEMAND_PLAN dependencies on MSD_DP_CALENDARS

Line 255: FROM msd_dp_calendars

251: CURSOR get_dp_cal(p_demand_plan_id NUMBER) IS
252: SELECT calendar_type, calendar_code, decode(calendar_type,
253: 1, initcap(calendar_code),
254: calendar_code) op_cal_code
255: FROM msd_dp_calendars
256: WHERE demand_plan_id = p_demand_plan_id;
257:
258: --
259: -- Validate input parameters

Line 478: from msd_dp_calendars

474: where lookup_type = 'MSD_PERIOD_TYPE'
475: and lookup_code = p_lvl_id
476: and not exists (
477: select 1
478: from msd_dp_calendars
479: where demand_plan_id = p_demand_plan_id
480: and calendar_type = decode(p_lvl_id,
481: 1,2,2,2,3,3,4,3,5,3,6,1,7,1,8,1,10,4,11,4,12,4,13,4,calendar_type));
482:

Line 765: FROM msd_time mtv, msd_dp_calendars mdc

761: p_demand_plan_id IN NUMBER,
762: p_field_name IN VARCHAR2) IS
763: CURSOR C1 IS
764: SELECT count(1)
765: FROM msd_time mtv, msd_dp_calendars mdc
766: WHERE mtv.day = p_date
767: AND rownum = 1
768: AND mtv.calendar_type = mdc.calendar_type
769: AND mtv.calendar_code = mdc.calendar_code

Line 1431: -- find level id in msd dp calendars to see if it exists.

1427: null;
1428: end;
1429:
1430: elsif lv_level_id1 is not null and param_rec.dimension_code = 'TIM' then
1431: -- find level id in msd dp calendars to see if it exists.
1432:
1433: begin
1434:
1435: open get_inv_hier_tim_prms(p_demand_plan_id, lv_level_id1);

Line 1527: from msd_dp_calendars

1523: where md.scenario_id = p_sc_id;
1524:
1525: cursor c2 is
1526: select count(1)
1527: from msd_dp_calendars
1528: where demand_plan_id = p_demand_plan_id;
1529:
1530: cursor c3(p_cal_type in number) is
1531: select count(1)

Line 1532: from msd_dp_calendars

1528: where demand_plan_id = p_demand_plan_id;
1529:
1530: cursor c3(p_cal_type in number) is
1531: select count(1)
1532: from msd_dp_calendars
1533: where demand_plan_id = p_demand_plan_id
1534: and calendar_type = p_cal_type;
1535:
1536: cursor c4(p_lvl_id in number) is

Line 2305: l_stmt := l_stmt || ' and (tim.calendar_type, tim.calendar_code) in (select mdc.calendar_type, mdc.calendar_code from msd_dp_calendars mdc where mdc.demand_plan_id = ' || p_demand_plan_id || ')';

2301: */
2302: l_stmt := l_stmt || ' AND EXISTS (select 1 from msd_time tim where src.';
2303: l_stmt := l_stmt || l_date_col || ' = tim.' || nvl(time_level_column, 'DAY');
2304:
2305: l_stmt := l_stmt || ' and (tim.calendar_type, tim.calendar_code) in (select mdc.calendar_type, mdc.calendar_code from msd_dp_calendars mdc where mdc.demand_plan_id = ' || p_demand_plan_id || ')';
2306: l_stmt := l_stmt || ' and ' || time_cal_type || ' = tim.calendar_type)';
2307:
2308:
2309: ELSE

Line 2548: from msd_dp_calendars

2544: l_num_cal_codes number;
2545:
2546: cursor c4 is
2547: select 1
2548: from msd_dp_calendars
2549: where calendar_type = p_calendar_type
2550: and demand_plan_id = p_demand_plan_id;
2551:
2552: CURSOR c1 IS

Line 2554: FROM msd_dp_calendars

2550: and demand_plan_id = p_demand_plan_id;
2551:
2552: CURSOR c1 IS
2553: SELECT count(1)
2554: FROM msd_dp_calendars
2555: WHERE demand_plan_id = p_demand_plan_id
2556: AND calendar_type = p_calendar_type;
2557:
2558: type c_cal_type is ref cursor;

Line 2663: l_stmt := l_stmt || '(SELECT calendar_code FROM msd_dp_calendars';

2659: l_stmt := 'SELECT ' || p_date_clmn;
2660: l_stmt := l_stmt || ' from msd_time ';
2661: l_stmt := l_stmt || ' where calendar_type = ' || p_calendar_type;
2662: l_stmt := l_stmt || ' and calendar_code in ';
2663: l_stmt := l_stmt || '(SELECT calendar_code FROM msd_dp_calendars';
2664: l_stmt := l_stmt || ' WHERE demand_plan_id = ' || p_demand_plan_id;
2665: l_stmt := l_stmt || ' AND calendar_type = ' || p_calendar_type || ')';
2666: l_stmt := l_stmt || ' AND day between ' || l_start_date || ' and ' || l_end_date;
2667: l_stmt := l_stmt || ' group by ' || p_date_clmn|| ' having count(distinct calendar_code || ' || p_date_clmn || ') < ' || num_cal_codes;