DBA Data[Home] [Help]

APPS.MSD_WS_DEM_RENAME_FORECAST dependencies on MSD_DP_SCENARIOS

Line 22: * Given the parameter NewPlanName, create (or replace) an entry in the table MSD_DP_SCENARIOS.

18: * forecast output.
19: * DataProfileName - Name of the Data Profile used to export
20: * forecast out of Demantra
21: *
22: * Given the parameter NewPlanName, create (or replace) an entry in the table MSD_DP_SCENARIOS.
23: * Demand Plan Id - (Hardcoded to) 5555555
24: * Scenario Id - Sequence starting from 8888888
25: *
26: * Using the DataProfileName, populate the table MSD_DP_SCENARIO_OUTPUT_LEVELS with

Line 83: || ' FROM msd_dp_scenarios mds '

79:
80:
81: /* Check if the given New Plan Name already exists */
82: x_sql_stmt := 'SELECT nvl(sum(scenario_id), 0) '
83: || ' FROM msd_dp_scenarios mds '
84: || ' WHERE mds.demand_plan_id = ' || MSD_DEM_UPLOAD_FORECAST.C_DEMAND_PLAN_ID
85: || ' AND mds.scenario_name = ''' || x_new_plan_name || '''';
86: EXECUTE IMMEDIATE x_sql_stmt INTO x_scenario_id;
87:

Line 89: /* Create/Update an entry for the Plan Name in the table msd_dp_scenarios */

85: || ' AND mds.scenario_name = ''' || x_new_plan_name || '''';
86: EXECUTE IMMEDIATE x_sql_stmt INTO x_scenario_id;
87:
88:
89: /* Create/Update an entry for the Plan Name in the table msd_dp_scenarios */
90: IF (x_scenario_id = 0) THEN
91:
92: SELECT MSD_DP_SCENARIOS_S.nextval
93: INTO x_scenario_id

Line 92: SELECT MSD_DP_SCENARIOS_S.nextval

88:
89: /* Create/Update an entry for the Plan Name in the table msd_dp_scenarios */
90: IF (x_scenario_id = 0) THEN
91:
92: SELECT MSD_DP_SCENARIOS_S.nextval
93: INTO x_scenario_id
94: FROM DUAL;
95: x_scenario_id := x_scenario_id + C_DUMMY_SCENARIO_ID_OFFSET;
96:

Line 97: INSERT INTO msd_dp_scenarios (

93: INTO x_scenario_id
94: FROM DUAL;
95: x_scenario_id := x_scenario_id + C_DUMMY_SCENARIO_ID_OFFSET;
96:
97: INSERT INTO msd_dp_scenarios (
98: demand_plan_id,
99: scenario_id,
100: scenario_name,
101: forecast_based_on,

Line 124: UPDATE msd_dp_scenarios

120: FND_GLOBAL.USER_ID);
121:
122: ELSE
123:
124: UPDATE msd_dp_scenarios
125: SET
126: forecast_based_on = substr(x_data_profile_name,1,30),
127: sc_type = msd_dem_upload_forecast.is_global_scenario(x_data_profile_id),
128: error_type = msd_dem_upload_forecast.get_error_type(x_data_profile_id),