DBA Data[Home] [Help]

APPS.MSC_LAUNCH_PLAN_PK dependencies on MSC_PLANS

Line 135: FROM msc_plans mp

131:
132: CURSOR check_plan_id(p_plan_id IN Number,
133: p_designator IN VARCHAR2) IS
134: SELECT 1
135: FROM msc_plans mp
136: WHERE mp.plan_id = p_plan_Id
137: AND mp.compile_designator = p_designator;
138:
139: CURSOR get_plan_id(p_designator IN VARCHAR2) IS

Line 141: FROM msc_plans mp

137: AND mp.compile_designator = p_designator;
138:
139: CURSOR get_plan_id(p_designator IN VARCHAR2) IS
140: SELECT mp.plan_id
141: FROM msc_plans mp
142: WHERE mp.compile_designator = p_designator;
143:
144: CURSOR C1(p_plan_id in number) IS
145: SELECT organization_id, sr_instance_id,

Line 149: FROM msc_plans

145: SELECT organization_id, sr_instance_id,
146: curr_Plan_Type, curr_Overwrite_Option,
147: request_id, plan_completion_date, summary_flag,
148: compile_designator
149: FROM msc_plans
150: WHERE plan_id = p_plan_id;
151:
152: v_rec_c1 c1%rowtype;
153:

Line 158: FROM msc_plans

154: cursor temp_plan_exist_cur(p_designator in varchar2,
155: p_org_id in number,
156: p_instance_id in number) is
157: SELECT plan_id, plan_completion_date,request_id, summary_flag
158: FROM msc_plans
159: WHERE compile_designator = p_designator
160: AND organization_id = p_org_id
161: AND sr_instance_id = p_instance_id;
162:

Line 174: from msc_designators desig, msc_plans plans

170: desig.organization_id,
171: desig.sr_instance_id,
172: plans.curr_plan_type,
173: plans.curr_overwrite_option
174: from msc_designators desig, msc_plans plans
175: where desig.designator = plans.compile_designator
176: and plans.plan_id= p_plan_id
177: and plans.organization_id = desig.organization_id
178: and plans.sr_instance_id = desig.sr_instance_id;

Line 208: update msc_plans

204: msc_util.msc_debug('New Plan Id is '||v_new_plan_id);
205: END IF;
206:
207: --Additional code for release reschedules bug#2881012
208: update msc_plans
209: set release_reschedules = nvl(arg_release_reschedules,2),
210: calculate_liability = nvl(p_calculate_liabilty,2)
211: --where plan_id = arg_plan_id;
212: where plan_id = v_new_plan_id;

Line 459: | Update msc_plans with plan horizon date |

455: end if;
456: -- End of additional code for 24X7 ATP - 30-10-2002
457:
458: /*----------------------------------------+
459: | Update msc_plans with plan horizon date |
460: +----------------------------------------*/
461: MSC_UTIL.msc_Debug('******About to Launch Plan******');
462: -- Modification for bug 1863615
463: -- IF arg_plan_horizon IS NULL THEN

Line 469: -- UPDATE msc_plans

465:
466: -- var_new_date := MSC_CALENDAR.NEXT_WORK_DAY(l_org_id,l_instance_id,1,
467: -- TO_DATE(TO_CHAR(add_months(sysdate, NVL(months, 12)),
468: -- 'YYYY/MM/DD HH24:MI:SS'), 'YYYY/MM/DD HH24:MI:SS')) ;
469: -- UPDATE msc_plans
470: -- SET curr_cutoff_date = var_new_date ,
471: -- online_replan = NULL
472: -- WHERE plan_id = arg_plan_id;
473: --

Line 479: -- UPDATE msc_plans

475:
476: -- ELSE
477:
478: -- var_new_date := MSC_CALENDAR.NEXT_WORK_DAY(l_org_id,l_instance_id,1,TO_DATE(arg_plan_horizon, 'YYYY/MM/DD HH24:MI:SS')) ;
479: -- UPDATE msc_plans
480: -- SET curr_cutoff_date = var_new_date,
481: -- online_replan = NULL
482: -- WHERE plan_id = arg_plan_id;
483: -- COMMIT;

Line 608: FROM msc_plans

604: -- SNOP Change start
605:
606: SELECT plan_start_date
607: INTO v_plan_completion_date
608: FROM msc_plans
609: WHERE plan_id = v_plan_id;
610:
611: IF (arg_launch_snapshot = DP_SCN_ONLY_SNAPSHOT AND
612: v_plan_completion_date is not null ) --Not a first time plan launch

Line 614: UPDATE msc_plans

610:
611: IF (arg_launch_snapshot = DP_SCN_ONLY_SNAPSHOT AND
612: v_plan_completion_date is not null ) --Not a first time plan launch
613: THEN
614: UPDATE msc_plans
615: SET planning_mode = DP_SCN_ONLY_SNP_MODE
616: WHERE plan_id = v_plan_id;
617: COMMIT;
618: ELSE

Line 619: UPDATE msc_plans

615: SET planning_mode = DP_SCN_ONLY_SNP_MODE
616: WHERE plan_id = v_plan_id;
617: COMMIT;
618: ELSE
619: UPDATE msc_plans
620: SET planning_mode = NULL
621: WHERE plan_id = v_plan_id;
622: COMMIT;
623: END IF;

Line 628: UPDATE msc_plans

624:
625: -- SNOP Change End
626: IF ( p_generate_fcst = 1 )
627: THEN
628: UPDATE msc_plans
629: SET GENERATE_INLINE_FORECAST= SYS_YES
630: WHERE plan_id = v_plan_id;
631: COMMIT;
632: ELSE

Line 633: UPDATE msc_plans

629: SET GENERATE_INLINE_FORECAST= SYS_YES
630: WHERE plan_id = v_plan_id;
631: COMMIT;
632: ELSE
633: UPDATE msc_plans
634: SET GENERATE_INLINE_FORECAST= SYS_NO
635: WHERE plan_id = v_plan_id;
636: COMMIT;
637:

Line 875: UPDATE msc_plans /* for 24x7 ATP */

871: return;
872: END IF;
873:
874:
875: UPDATE msc_plans /* for 24x7 ATP */
876: SET request_id = var_snapshot_req_id
877: WHERE plan_id = v_plan_id;
878:
879: COMMIT;

Line 1032: UPDATE msc_plans /* for 24x7 ATP */

1028: return;
1029: END IF;
1030: END IF;
1031: END IF;
1032: UPDATE msc_plans /* for 24x7 ATP */
1033: SET request_id = var_snapshot_req_id
1034: WHERE plan_id = v_plan_id;
1035:
1036: COMMIT;

Line 1050: from msc_plans

1046: where organization_id = v_rec_c1.organization_id
1047: AND sr_instance_id = v_rec_c1.sr_instance_id
1048: AND (designator,designator_type) in
1049: (select compile_designator, plan_type
1050: from msc_plans
1051: Where plan_id = v_plan_id);
1052:
1053: exception when no_data_found then
1054: null;

Line 1059: update msc_plans

1055: end;
1056:
1057: --pabram..phub
1058: MSC_UTIL.msc_Debug('phub archive_flag :'|| to_char(p_archive_flag));
1059: update msc_plans
1060: set archive_flag = p_archive_flag
1061: where plan_id = v_plan_id;
1062: commit;
1063: --pabram..phub ends

Line 1146: From Msc_Plans

1142: Weekly_Trans_Constraints,
1143: curr_start_date,
1144: curr_cutoff_date,
1145: release_reschedules
1146: From Msc_Plans
1147: Where Plan_Id = p_plan_id;
1148:
1149: -- Modified (forward port) for the bug # 3021850
1150: Cursor Desig_Cur(p_plan_id in number) Is

Line 1157: From Msc_Plans

1153: organization_selection,last_update_date,last_updated_by,last_update_login,nvl(purge_current_plan,2) purge_current_plan
1154: From Msc_Designators
1155: Where (Designator, Organization_Id, Sr_Instance_Id) =
1156: ( Select Compile_Designator, Organization_Id, Sr_Instance_Id
1157: From Msc_Plans
1158: Where Plan_Id=p_plan_id);
1159:
1160: cursor c_plan_name(p_designator in varchar2) is
1161: select designator

Line 1262: update msc_plans

1258: -- 2. Multiple temp plans cannot be created with the same name which
1259: -- will violate the unique key(designator,sr_instance_id and organization_id)
1260: -------------------------------------------------------------------------------
1261:
1262: update msc_plans
1263: set compile_designator = decode(v_org_desig_cur.purge_current_plan,2,lv_plan_name, nvl(substr(to_char(p_temp_plan_id),-10),p_temp_plan_id)),
1264: -- copy_plan_id=p_temp_plan_id,
1265: copy_plan_id=decode(v_org_desig_cur.purge_current_plan,2,-1,-2),
1266: plan_completion_date = decode(v_org_desig_cur.purge_current_plan,2,v_org_plan_name_Cur.plan_completion_date,null),

Line 1312: Update msc_plans

1308: -- ----------------------------------------------
1309: -- Bug#2761381 - restoring all the columns which
1310: -- will not be modified from Plan options UI.
1311: -- ----------------------------------------------
1312: Update msc_plans
1313: set copy_plan_id = -1,
1314: Last_Update_Date = v_temp_plan_name_cur.Last_Update_Date,
1315: Last_Updated_By = v_temp_plan_name_cur.Last_Updated_By,
1316: Last_Update_Login = v_temp_plan_name_cur.Last_Update_Login,

Line 1452: from msc_plans

1448: program_id = v_temp_plan_name_cur.program_id,
1449: program_update_date = v_temp_plan_name_cur.program_update_date
1450: where (designator,organization_id,sr_instance_id)
1451: = ( select compile_designator,organization_id,sr_instance_id
1452: from msc_plans
1453: where plan_id=p_temp_plan_id);
1454:
1455: Update MSC_PLAN_ORGANIZATIONS
1456: set plan_completion_date = v_temp_plan_name_cur.Plan_Completion_Date,

Line 1590: Update msc_plans_other

1586: MSC_UTIL.msc_Debug('Error updating preferences and schedules.');
1587: RAISE;
1588: END;
1589: -- Bug#7449943
1590: Update msc_plans_other
1591: set ref_plan_id = p_temp_plan_id
1592: where ref_plan_id = p_org_plan_id;
1593:
1594: commit;

Line 1650: FROM msc_plans

1646: CURSOR C1(p_plan_id in number)
1647: IS
1648: SELECT request_id
1649: , compile_designator
1650: FROM msc_plans
1651: WHERE plan_id = p_plan_id;
1652:
1653: v_rec_c1 c1%rowtype;
1654:

Line 1659: Update msc_plans.planning_mode with arg_launch_scheduler

1655: v_ex_error_plan_launch EXCEPTION;
1656: BEGIN
1657:
1658: /*================================================================
1659: Update msc_plans.planning_mode with arg_launch_scheduler
1660: if arg_launch_scheduler == DS_EXP_ONLY (DS Exception only mode)
1661: then msc_plans.planning_mode will be set to 1.
1662: In all other cases msc_plans.planning_mode will be set to NULL
1663: ================================================================*/

Line 1661: then msc_plans.planning_mode will be set to 1.

1657:
1658: /*================================================================
1659: Update msc_plans.planning_mode with arg_launch_scheduler
1660: if arg_launch_scheduler == DS_EXP_ONLY (DS Exception only mode)
1661: then msc_plans.planning_mode will be set to 1.
1662: In all other cases msc_plans.planning_mode will be set to NULL
1663: ================================================================*/
1664: BEGIN
1665: update msc_plans

Line 1662: In all other cases msc_plans.planning_mode will be set to NULL

1658: /*================================================================
1659: Update msc_plans.planning_mode with arg_launch_scheduler
1660: if arg_launch_scheduler == DS_EXP_ONLY (DS Exception only mode)
1661: then msc_plans.planning_mode will be set to 1.
1662: In all other cases msc_plans.planning_mode will be set to NULL
1663: ================================================================*/
1664: BEGIN
1665: update msc_plans
1666: set planning_mode = decode(arg_launch_scheduler, DS_EXP_ONLY, 1,

Line 1665: update msc_plans

1661: then msc_plans.planning_mode will be set to 1.
1662: In all other cases msc_plans.planning_mode will be set to NULL
1663: ================================================================*/
1664: BEGIN
1665: update msc_plans
1666: set planning_mode = decode(arg_launch_scheduler, DS_EXP_ONLY, 1,
1667: DS_OLS_ONLY, DS_OLS_ONLY,
1668: NULL),
1669: curr_ols_horizon_days = arg_ols_horizon_days,

Line 1676: MSC_UTIL.msc_Debug('Error while updating msc_plans.planning_mode. Plan_id = '||to_char(arg_plan_id));

1672:
1673: COMMIT;
1674:
1675: EXCEPTION WHEN OTHERS THEN
1676: MSC_UTIL.msc_Debug('Error while updating msc_plans.planning_mode. Plan_id = '||to_char(arg_plan_id));
1677: MSC_UTIL.msc_Debug(SQLERRM);
1678: END;
1679:
1680: v_plan_id := arg_plan_id;

Line 1935: FROM msc_plans

1931:
1932:
1933: SELECT nvl(request_id, NULL_VALUE)
1934: INTO l_request_id
1935: FROM msc_plans
1936: WHERE plan_id = l_plan_id;
1937:
1938:
1939: -- Wait until the request_id is populated in msc_Plans.

Line 1939: -- Wait until the request_id is populated in msc_Plans.

1935: FROM msc_plans
1936: WHERE plan_id = l_plan_id;
1937:
1938:
1939: -- Wait until the request_id is populated in msc_Plans.
1940: WHILE ( l_request_id < launch_plan_request_id)
1941: LOOP
1942: SELECT nvl(request_id, NULL_VALUE)
1943: INTO l_request_id

Line 1944: FROM msc_plans

1940: WHILE ( l_request_id < launch_plan_request_id)
1941: LOOP
1942: SELECT nvl(request_id, NULL_VALUE)
1943: INTO l_request_id
1944: FROM msc_plans
1945: WHERE plan_id = l_plan_id;
1946:
1947: DBMS_LOCK.SLEEP(10);
1948: END LOOP;

Line 1953: FROM msc_plans

1949:
1950: -- Request_id is populated. Get the planning Mode
1951: SELECT planning_mode
1952: INTO l_planning_mode
1953: FROM msc_plans
1954: WHERE plan_id = l_plan_id;
1955:
1956: IF (l_planning_mode is null ) -- Both snapshot and planner would be launched
1957: THEN

Line 1976: FROM msc_plans

1972: IF (l_snapshot_request_id <> NULL_VALUE )
1973: THEN
1974: SELECT nvl(request_id, NULL_VALUE)
1975: INTO l_request_id
1976: FROM msc_plans
1977: WHERE plan_id = l_plan_id;
1978:
1979: -- Wait until the Plan_request_id is populated in msc_Plans.
1980: WHILE ( l_request_id < l_snapshot_request_id)

Line 1979: -- Wait until the Plan_request_id is populated in msc_Plans.

1975: INTO l_request_id
1976: FROM msc_plans
1977: WHERE plan_id = l_plan_id;
1978:
1979: -- Wait until the Plan_request_id is populated in msc_Plans.
1980: WHILE ( l_request_id < l_snapshot_request_id)
1981: LOOP
1982: SELECT nvl(request_id, NULL_VALUE)
1983: INTO l_request_id

Line 1984: FROM msc_plans

1980: WHILE ( l_request_id < l_snapshot_request_id)
1981: LOOP
1982: SELECT nvl(request_id, NULL_VALUE)
1983: INTO l_request_id
1984: FROM msc_plans
1985: WHERE plan_id = l_plan_id;
1986:
1987: DBMS_LOCK.SLEEP(10);
1988: END LOOP;