21: SYS_YES CONSTANT INTEGER := 1;
22: MPS_RELIEF CONSTANT INTEGER := 2;
23: R_AUTO_REDUCE CONSTANT INTEGER := 4;
24:
25: transaction_id mrp_schedule_dates.mps_transaction_id%TYPE;
26: sched_quantity mrp_schedule_dates.schedule_quantity%TYPE;
27: sched_date mrp_schedule_dates.schedule_date%TYPE;
28: sched_rowid ROWID;
29: var_watch_id NUMBER;
22: MPS_RELIEF CONSTANT INTEGER := 2;
23: R_AUTO_REDUCE CONSTANT INTEGER := 4;
24:
25: transaction_id mrp_schedule_dates.mps_transaction_id%TYPE;
26: sched_quantity mrp_schedule_dates.schedule_quantity%TYPE;
27: sched_date mrp_schedule_dates.schedule_date%TYPE;
28: sched_rowid ROWID;
29: var_watch_id NUMBER;
30: rows_processed NUMBER := 0;
23: R_AUTO_REDUCE CONSTANT INTEGER := 4;
24:
25: transaction_id mrp_schedule_dates.mps_transaction_id%TYPE;
26: sched_quantity mrp_schedule_dates.schedule_quantity%TYPE;
27: sched_date mrp_schedule_dates.schedule_date%TYPE;
28: sched_rowid ROWID;
29: var_watch_id NUMBER;
30: rows_processed NUMBER := 0;
31: VERSION CONSTANT CHAR(80) :=
38: SELECT mps_transaction_id,
39: schedule_quantity,
40: schedule_date,
41: rowid
42: FROM mrp_schedule_dates dates
43: WHERE exists
44: (SELECT NULL
45: FROM bom_calendar_dates cal1,
46: bom_calendar_dates cal2,
112: var_watch_id := mrp_print_pk.start_watch('GEN-updated',
113: arg_request_id,
114: arg_user_id,
115: 'ENTITY',
116: 'mrp_schedule_dates',
117: 'N');
118: OPEN DISCRETE_SCHEDULES_CUR;
119: LOOP
120: FETCH DISCRETE_SCHEDULES_CUR INTO
163: NULL,
164: NULL,
165: NULL);
166:
167: UPDATE mrp_schedule_dates
168: SET schedule_quantity = 0,
169: last_updated_by = arg_user_id,
170: last_update_date = SYSDATE
171: WHERE rowid = sched_rowid;
184: 'ROUTINE',
185: 'mrarmps_auto_reduce_mps',
186: 'N',
187: 'TABLE',
188: 'mrp_schedule_dates',
189: 'N');
190: DELETE mrp_schedule_dates dates
191: WHERE exists
192: (SELECT NULL
186: 'N',
187: 'TABLE',
188: 'mrp_schedule_dates',
189: 'N');
190: DELETE mrp_schedule_dates dates
191: WHERE exists
192: (SELECT NULL
193: FROM bom_calendar_dates cal1,
194: bom_calendar_dates cal2,
257: var_watch_id := mrp_print_pk.start_watch('GEN-updated',
258: arg_request_id,
259: arg_user_id,
260: 'ENTITY',
261: 'mrp_schedule_dates',
262: 'N');
263:
264: UPDATE mrp_schedule_dates dates
265: SET last_update_date = SYSDATE,
260: 'ENTITY',
261: 'mrp_schedule_dates',
262: 'N');
263:
264: UPDATE mrp_schedule_dates dates
265: SET last_update_date = SYSDATE,
266: last_updated_by = arg_user_id,
267: dates.schedule_date =
268: (SELECT cal2.calendar_date