DBA Data[Home] [Help]

APPS.MSD_WS_DEM_RENAME_FORECAST dependencies on MSD_DP_SCENARIOS

Line 72: || ' FROM msd_dp_scenarios mds '

68:
69:
70: /* Check if the given New Plan Name already exists */
71: x_sql_stmt := 'SELECT nvl(sum(scenario_id), 0) '
72: || ' FROM msd_dp_scenarios mds '
73: || ' WHERE mds.demand_plan_id = ' || MSD_DEM_UPLOAD_FORECAST.C_DEMAND_PLAN_ID
74: || ' AND mds.scenario_name = ''' || x_new_plan_name || '''';
75: EXECUTE IMMEDIATE x_sql_stmt INTO x_scenario_id;
76:

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

74: || ' AND mds.scenario_name = ''' || x_new_plan_name || '''';
75: EXECUTE IMMEDIATE x_sql_stmt INTO x_scenario_id;
76:
77:
78: /* Create/Update an entry for the Plan Name in the table msd_dp_scenarios */
79: IF (x_scenario_id = 0) THEN
80:
81: SELECT MSD_DP_SCENARIOS_S.nextval
82: INTO x_scenario_id

Line 81: SELECT MSD_DP_SCENARIOS_S.nextval

77:
78: /* Create/Update an entry for the Plan Name in the table msd_dp_scenarios */
79: IF (x_scenario_id = 0) THEN
80:
81: SELECT MSD_DP_SCENARIOS_S.nextval
82: INTO x_scenario_id
83: FROM DUAL;
84: x_scenario_id := x_scenario_id + C_DUMMY_SCENARIO_ID_OFFSET;
85:

Line 86: INSERT INTO msd_dp_scenarios (

82: INTO x_scenario_id
83: FROM DUAL;
84: x_scenario_id := x_scenario_id + C_DUMMY_SCENARIO_ID_OFFSET;
85:
86: INSERT INTO msd_dp_scenarios (
87: demand_plan_id,
88: scenario_id,
89: scenario_name,
90: forecast_based_on,

Line 113: UPDATE msd_dp_scenarios

109: FND_GLOBAL.USER_ID);
110:
111: ELSE
112:
113: UPDATE msd_dp_scenarios
114: SET
115: forecast_based_on = substrb(x_data_profile_name,1,30),
116: sc_type = msd_dem_upload_forecast.is_global_scenario(x_data_profile_id),
117: error_type = msd_dem_upload_forecast.get_error_type(x_data_profile_id),

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

355: * forecast output.
356: * DataProfileName - Name of the Data Profile used to export
357: * forecast out of Demantra
358: *
359: * Given the parameter NewPlanName, create (or replace) an entry in the table MSD_DP_SCENARIOS.
360: * Demand Plan Id - (Hardcoded to) 5555555
361: * Scenario Id - Sequence starting from 8888888
362: *
363: * Using the DataProfileName, populate the table MSD_DP_SCENARIO_OUTPUT_LEVELS with

Line 667: * msd_dp_scenarios, msd_dp_scenario_output_levels,

663: * 2. If the plan_name is assocaited to supply plans and p_delete_assoc is set YES
664: * (OR)
665: * If the plan_name is assocaited NOT to any supply plan
666: * then delete all the data for the plan_name from
667: * msd_dp_scenarios, msd_dp_scenario_output_levels,
668: * msd_dp_scn_entries_denorm, msc_plan_schedules tables
669: *
670: */
671:

Line 697: || ' FROM msd_dp_scenarios mds '

693: msd_dem_common_utilities.log_message (' ');
694:
695: /* Get the scenario_id of given Plan scenario id */
696: x_sql_stmt := 'SELECT nvl(sum(scenario_id), 0) '
697: || ' FROM msd_dp_scenarios mds '
698: || ' WHERE associate_parameter = ''Assign Plan Name'' '
699: || ' AND mds.demand_plan_id = ' || MSD_DEM_UPLOAD_FORECAST.C_DEMAND_PLAN_ID
700: || ' AND mds.scenario_id = ' || p_plan_scn_id ;
701:

Line 734: /* msd_dp_scenarios */

730: RETURN;
731:
732: ELSIF (x_attached_flag = 0 OR (x_attached_flag <> 0 AND p_delete_assoc = C_YES) ) THEN -- scenario_id is NOT attached OR scenario_id is attached, delete_assoc is YES
733:
734: /* msd_dp_scenarios */
735: x_del_stmt := 'DELETE FROM msd_dp_scenarios WHERE scenario_id = ' || x_scenario_id ;
736: EXECUTE IMMEDIATE x_del_stmt;
737: x_count := SQL%ROWCOUNT;
738: COMMIT;

Line 735: x_del_stmt := 'DELETE FROM msd_dp_scenarios WHERE scenario_id = ' || x_scenario_id ;

731:
732: ELSIF (x_attached_flag = 0 OR (x_attached_flag <> 0 AND p_delete_assoc = C_YES) ) THEN -- scenario_id is NOT attached OR scenario_id is attached, delete_assoc is YES
733:
734: /* msd_dp_scenarios */
735: x_del_stmt := 'DELETE FROM msd_dp_scenarios WHERE scenario_id = ' || x_scenario_id ;
736: EXECUTE IMMEDIATE x_del_stmt;
737: x_count := SQL%ROWCOUNT;
738: COMMIT;
739: