DBA Data[Home] [Help]

APPS.MSD_VALIDATE_DEMAND_PLAN dependencies on MSD_DP_CALENDARS

Line 259: FROM msd_dp_calendars

255: CURSOR get_dp_cal(p_demand_plan_id NUMBER) IS
256: SELECT calendar_type, calendar_code, decode(calendar_type,
257: 1, initcap(calendar_code),
258: calendar_code) op_cal_code
259: FROM msd_dp_calendars
260: WHERE demand_plan_id = p_demand_plan_id;
261:
262: --
263: -- Validate input parameters

Line 482: from msd_dp_calendars

478: where lookup_type = 'MSD_PERIOD_TYPE'
479: and lookup_code = p_lvl_id
480: and not exists (
481: select 1
482: from msd_dp_calendars
483: where demand_plan_id = p_demand_plan_id
484: and calendar_type = decode(p_lvl_id,
485: 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));
486:

Line 770: FROM msd_time mtv, msd_dp_calendars mdc

766: p_demand_plan_id IN NUMBER,
767: p_field_name IN VARCHAR2) IS
768: CURSOR C1 IS
769: SELECT count(1)
770: FROM msd_time mtv, msd_dp_calendars mdc
771: WHERE mtv.day = p_date
772: AND rownum = 1
773: AND mtv.calendar_type = mdc.calendar_type
774: AND mtv.calendar_code = mdc.calendar_code

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

1412: null;
1413: end;
1414:
1415: elsif lv_level_id1 is not null and param_rec.dimension_code = 'TIM' then
1416: -- find level id in msd dp calendars to see if it exists.
1417:
1418: begin
1419:
1420: open get_inv_hier_tim_prms(p_demand_plan_id, lv_level_id1);

Line 1512: from msd_dp_calendars

1508: where md.scenario_id = p_sc_id;
1509:
1510: cursor c2 is
1511: select count(1)
1512: from msd_dp_calendars
1513: where demand_plan_id = p_demand_plan_id;
1514:
1515: cursor c3(p_cal_type in number) is
1516: select count(1)

Line 1517: from msd_dp_calendars

1513: where demand_plan_id = p_demand_plan_id;
1514:
1515: cursor c3(p_cal_type in number) is
1516: select count(1)
1517: from msd_dp_calendars
1518: where demand_plan_id = p_demand_plan_id
1519: and calendar_type = p_cal_type;
1520:
1521: cursor c4(p_lvl_id in number) is

Line 2373: 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 || ')';

2369: */
2370: l_stmt := l_stmt || ' AND EXISTS (select 1 from msd_time tim where src.';
2371: l_stmt := l_stmt || l_date_col || ' = tim.' || nvl(time_level_column, 'DAY');
2372:
2373: 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 || ')';
2374: l_stmt := l_stmt || ' and ' || time_cal_type || ' = tim.calendar_type)';
2375:
2376:
2377: If c_input_rec.ascp_stream_flag = 'Y' then

Line 2381: l_new_stmt := l_new_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 || ')';

2377: If c_input_rec.ascp_stream_flag = 'Y' then
2378: l_new_stmt := l_new_stmt || ' AND EXISTS (select 1 from msd_time tim where src.';
2379: l_new_stmt := l_new_stmt || l_date_col || ' = tim.' || nvl(time_level_column, 'DAY');
2380:
2381: l_new_stmt := l_new_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 || ')';
2382: l_new_stmt := l_new_stmt || ' and ' || time_cal_type || ' = tim.calendar_type)';
2383: end if;
2384:
2385: ELSE

Line 2681: from msd_dp_calendars

2677: l_num_cal_codes number;
2678:
2679: cursor c4 is
2680: select 1
2681: from msd_dp_calendars
2682: where calendar_type = p_calendar_type
2683: and demand_plan_id = p_demand_plan_id;
2684:
2685: CURSOR c1 IS

Line 2687: FROM msd_dp_calendars

2683: and demand_plan_id = p_demand_plan_id;
2684:
2685: CURSOR c1 IS
2686: SELECT count(1)
2687: FROM msd_dp_calendars
2688: WHERE demand_plan_id = p_demand_plan_id
2689: AND calendar_type = p_calendar_type;
2690:
2691: type c_cal_type is ref cursor;

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

2792: l_stmt := 'SELECT ' || p_date_clmn;
2793: l_stmt := l_stmt || ' from msd_time ';
2794: l_stmt := l_stmt || ' where calendar_type = ' || p_calendar_type;
2795: l_stmt := l_stmt || ' and calendar_code in ';
2796: l_stmt := l_stmt || '(SELECT calendar_code FROM msd_dp_calendars';
2797: l_stmt := l_stmt || ' WHERE demand_plan_id = ' || p_demand_plan_id;
2798: l_stmt := l_stmt || ' AND calendar_type = ' || p_calendar_type || ')';
2799: l_stmt := l_stmt || ' AND day between ' || l_start_date || ' and ' || l_end_date;
2800: l_stmt := l_stmt || ' group by ' || p_date_clmn|| ' having count(distinct calendar_code || ' || p_date_clmn || ') < ' || num_cal_codes;