DBA Data[Home] [Help]

VIEW: APPS.MSD_DP_DEFAULT_SCENARIO_V

Source

View Text - Preformatted

SELECT ds.scenario_id, dp.demand_plan_name||':'||ds.scenario_name FROM msd_dp_scenarios ds, msd_demand_plans dp WHERE ds.demand_plan_id = dp.demand_plan_id and ds.publish_flag = 'Y' /* item or product family level */ and exists(select 1 from msd_dp_scenario_output_levels ol where ol.demand_plan_id = ds.demand_plan_id and ol.scenario_id = ds.scenario_id and ol.level_id in (1,3)) /* organization level */ and exists(select 1 from msd_dp_scenario_output_levels ol where ol.demand_plan_id = ds.demand_plan_id and ol.scenario_id = ds.scenario_id and ol.level_id = 7)
View Text - HTML Formatted

SELECT DS.SCENARIO_ID
, DP.DEMAND_PLAN_NAME||':'||DS.SCENARIO_NAME
FROM MSD_DP_SCENARIOS DS
, MSD_DEMAND_PLANS DP
WHERE DS.DEMAND_PLAN_ID = DP.DEMAND_PLAN_ID
AND DS.PUBLISH_FLAG = 'Y' /* ITEM OR PRODUCT FAMILY LEVEL */
AND EXISTS(SELECT 1
FROM MSD_DP_SCENARIO_OUTPUT_LEVELS OL
WHERE OL.DEMAND_PLAN_ID = DS.DEMAND_PLAN_ID
AND OL.SCENARIO_ID = DS.SCENARIO_ID
AND OL.LEVEL_ID IN (1
, 3)) /* ORGANIZATION LEVEL */
AND EXISTS(SELECT 1
FROM MSD_DP_SCENARIO_OUTPUT_LEVELS OL
WHERE OL.DEMAND_PLAN_ID = DS.DEMAND_PLAN_ID
AND OL.SCENARIO_ID = DS.SCENARIO_ID
AND OL.LEVEL_ID = 7)