DBA Data[Home] [Help]

APPS.GME_CREATE_STEP_PVT dependencies on GME_BATCH_STEPS

Line 24: l_gme_batch_steps gme_create_step_pvt.gme_batch_steps_tab

20: ,p_step_cmplt_date IN DATE := NULL
21: ,p_step_due_date IN DATE := NULL)
22: IS
23: -- Local variables
24: l_gme_batch_steps gme_create_step_pvt.gme_batch_steps_tab
25: := gme_create_step_pvt.gme_batch_steps_tab
26: ();
27: l_gme_batch_step_activities gme_create_step_pvt.gme_batch_step_activities_tab
28: := gme_create_step_pvt.gme_batch_step_activities_tab

Line 25: := gme_create_step_pvt.gme_batch_steps_tab

21: ,p_step_due_date IN DATE := NULL)
22: IS
23: -- Local variables
24: l_gme_batch_steps gme_create_step_pvt.gme_batch_steps_tab
25: := gme_create_step_pvt.gme_batch_steps_tab
26: ();
27: l_gme_batch_step_activities gme_create_step_pvt.gme_batch_step_activities_tab
28: := gme_create_step_pvt.gme_batch_step_activities_tab
29: ();

Line 51: l_batchstep_id gme_batch_steps.batchstep_id%TYPE;

47: i PLS_INTEGER;
48: j PLS_INTEGER;
49: l_batch_id gme_batch_header.batch_id%TYPE;
50: l_step_tbl gmd_auto_step_calc.step_rec_tbl;
51: l_batchstep_id gme_batch_steps.batchstep_id%TYPE;
52: l_last_batchstep_id gme_batch_steps.batchstep_id%TYPE;
53: l_qty gme_batch_steps.plan_step_qty%TYPE;
54: l_mass_qty gme_batch_steps.plan_mass_qty%TYPE;
55: l_volume_qty gme_batch_steps.plan_volume_qty%TYPE;

Line 52: l_last_batchstep_id gme_batch_steps.batchstep_id%TYPE;

48: j PLS_INTEGER;
49: l_batch_id gme_batch_header.batch_id%TYPE;
50: l_step_tbl gmd_auto_step_calc.step_rec_tbl;
51: l_batchstep_id gme_batch_steps.batchstep_id%TYPE;
52: l_last_batchstep_id gme_batch_steps.batchstep_id%TYPE;
53: l_qty gme_batch_steps.plan_step_qty%TYPE;
54: l_mass_qty gme_batch_steps.plan_mass_qty%TYPE;
55: l_volume_qty gme_batch_steps.plan_volume_qty%TYPE;
56: l_plan_charges gme_batch_steps.plan_charges%TYPE;

Line 53: l_qty gme_batch_steps.plan_step_qty%TYPE;

49: l_batch_id gme_batch_header.batch_id%TYPE;
50: l_step_tbl gmd_auto_step_calc.step_rec_tbl;
51: l_batchstep_id gme_batch_steps.batchstep_id%TYPE;
52: l_last_batchstep_id gme_batch_steps.batchstep_id%TYPE;
53: l_qty gme_batch_steps.plan_step_qty%TYPE;
54: l_mass_qty gme_batch_steps.plan_mass_qty%TYPE;
55: l_volume_qty gme_batch_steps.plan_volume_qty%TYPE;
56: l_plan_charges gme_batch_steps.plan_charges%TYPE;
57: l_charge gme_batch_steps.plan_charges%TYPE;

Line 54: l_mass_qty gme_batch_steps.plan_mass_qty%TYPE;

50: l_step_tbl gmd_auto_step_calc.step_rec_tbl;
51: l_batchstep_id gme_batch_steps.batchstep_id%TYPE;
52: l_last_batchstep_id gme_batch_steps.batchstep_id%TYPE;
53: l_qty gme_batch_steps.plan_step_qty%TYPE;
54: l_mass_qty gme_batch_steps.plan_mass_qty%TYPE;
55: l_volume_qty gme_batch_steps.plan_volume_qty%TYPE;
56: l_plan_charges gme_batch_steps.plan_charges%TYPE;
57: l_charge gme_batch_steps.plan_charges%TYPE;
58: l_uom_class mtl_units_of_measure.uom_class%TYPE;

Line 55: l_volume_qty gme_batch_steps.plan_volume_qty%TYPE;

51: l_batchstep_id gme_batch_steps.batchstep_id%TYPE;
52: l_last_batchstep_id gme_batch_steps.batchstep_id%TYPE;
53: l_qty gme_batch_steps.plan_step_qty%TYPE;
54: l_mass_qty gme_batch_steps.plan_mass_qty%TYPE;
55: l_volume_qty gme_batch_steps.plan_volume_qty%TYPE;
56: l_plan_charges gme_batch_steps.plan_charges%TYPE;
57: l_charge gme_batch_steps.plan_charges%TYPE;
58: l_uom_class mtl_units_of_measure.uom_class%TYPE;
59: l_batchstep_activity_id gme_batch_step_activities.batchstep_activity_id%TYPE;

Line 56: l_plan_charges gme_batch_steps.plan_charges%TYPE;

52: l_last_batchstep_id gme_batch_steps.batchstep_id%TYPE;
53: l_qty gme_batch_steps.plan_step_qty%TYPE;
54: l_mass_qty gme_batch_steps.plan_mass_qty%TYPE;
55: l_volume_qty gme_batch_steps.plan_volume_qty%TYPE;
56: l_plan_charges gme_batch_steps.plan_charges%TYPE;
57: l_charge gme_batch_steps.plan_charges%TYPE;
58: l_uom_class mtl_units_of_measure.uom_class%TYPE;
59: l_batchstep_activity_id gme_batch_step_activities.batchstep_activity_id%TYPE;
60: l_activity_factor gme_batch_step_activities.plan_activity_factor%TYPE;

Line 57: l_charge gme_batch_steps.plan_charges%TYPE;

53: l_qty gme_batch_steps.plan_step_qty%TYPE;
54: l_mass_qty gme_batch_steps.plan_mass_qty%TYPE;
55: l_volume_qty gme_batch_steps.plan_volume_qty%TYPE;
56: l_plan_charges gme_batch_steps.plan_charges%TYPE;
57: l_charge gme_batch_steps.plan_charges%TYPE;
58: l_uom_class mtl_units_of_measure.uom_class%TYPE;
59: l_batchstep_activity_id gme_batch_step_activities.batchstep_activity_id%TYPE;
60: l_activity_factor gme_batch_step_activities.plan_activity_factor%TYPE;
61: l_resources gme_batch_step_resources.resources%TYPE;

Line 108: FROM gme_batch_steps

104:
105: CURSOR cur_get_batch_steps (v_batch_id NUMBER, v_count NUMBER DEFAULT 0)
106: IS
107: SELECT batchstep_id, plan_step_qty, plan_charges
108: FROM gme_batch_steps
109: WHERE batch_id = v_batch_id
110: AND ( v_count <> 1
111: OR ( v_count = 1
112: AND batchstep_id = (SELECT MAX (batchstep_id)

Line 113: FROM gme_batch_steps

109: WHERE batch_id = v_batch_id
110: AND ( v_count <> 1
111: OR ( v_count = 1
112: AND batchstep_id = (SELECT MAX (batchstep_id)
113: FROM gme_batch_steps
114: WHERE batch_id = v_batch_id) ) );
115:
116: CURSOR cur_get_activities (v_batch_id NUMBER)
117: IS

Line 144: ,v_batchstep_id gme_batch_steps.batchstep_id%TYPE)

140: WHERE recipe_validity_rule_id = v_recipe_validity_rule_id;
141:
142: CURSOR cur_step_dates (
143: v_batch_id gme_batch_header.batch_id%TYPE
144: ,v_batchstep_id gme_batch_steps.batchstep_id%TYPE)
145: IS
146: SELECT plan_start_date, plan_cmplt_date
147: FROM gme_batch_steps
148: WHERE batch_id = v_batch_id AND batchstep_id = v_batchstep_id;

Line 147: FROM gme_batch_steps

143: v_batch_id gme_batch_header.batch_id%TYPE
144: ,v_batchstep_id gme_batch_steps.batchstep_id%TYPE)
145: IS
146: SELECT plan_start_date, plan_cmplt_date
147: FROM gme_batch_steps
148: WHERE batch_id = v_batch_id AND batchstep_id = v_batchstep_id;
149:
150: CURSOR cur_step_plan_cmplt_date (
151: v_batch_id gme_batch_header.batch_id%TYPE

Line 152: ,v_batchstep_id gme_batch_steps.batchstep_id%TYPE)

148: WHERE batch_id = v_batch_id AND batchstep_id = v_batchstep_id;
149:
150: CURSOR cur_step_plan_cmplt_date (
151: v_batch_id gme_batch_header.batch_id%TYPE
152: ,v_batchstep_id gme_batch_steps.batchstep_id%TYPE)
153: IS
154: SELECT plan_cmplt_date
155: FROM gme_batch_steps
156: WHERE batch_id = v_batch_id AND batchstep_id = v_batchstep_id;

Line 155: FROM gme_batch_steps

151: v_batch_id gme_batch_header.batch_id%TYPE
152: ,v_batchstep_id gme_batch_steps.batchstep_id%TYPE)
153: IS
154: SELECT plan_cmplt_date
155: FROM gme_batch_steps
156: WHERE batch_id = v_batch_id AND batchstep_id = v_batchstep_id;
157:
158: CURSOR cur_is_charge_associated (v_batch_id NUMBER, v_batchstep_id NUMBER)
159: IS

Line 180: FROM gme_batch_steps

176:
177: CURSOR cur_get_batchstep_ids (v_batch_id NUMBER)
178: IS
179: SELECT batchstep_id
180: FROM gme_batch_steps
181: WHERE batch_id = v_batch_id;
182: BEGIN
183: IF g_debug <= gme_debug.g_log_procedure THEN
184: gme_debug.put_line ('Entering api ' || g_pkg_name || '.'

Line 211: -- Create data for GME_BATCH_STEPS...

207:
208: -- Note that by doing an extend to the PL/SQL table, a record is added to the collection
209: -- and all elements are initialized to NULL. Therefore, no need to initialize NULL elements
210: -- explicitly through an assignment statement as that is done in the EXTEND!
211: -- Create data for GME_BATCH_STEPS...
212: i := p_recipe_rout_step_tbl.FIRST;
213: j := 0;
214: l_step_charge_rsrc_tab.DELETE ();
215:

Line 221: l_gme_batch_steps.EXTEND;

217: IF (NVL(g_debug, -1) = gme_debug.g_log_statement) THEN
218: gme_debug.put_line ('copy_routing_text_ind = '||gme_common_pvt.g_copy_routing_text_ind);
219: END IF;
220: WHILE i IS NOT NULL LOOP
221: l_gme_batch_steps.EXTEND;
222:
223: IF (j = 0) THEN
224: j := l_gme_batch_steps.FIRST;
225: ELSE

Line 224: j := l_gme_batch_steps.FIRST;

220: WHILE i IS NOT NULL LOOP
221: l_gme_batch_steps.EXTEND;
222:
223: IF (j = 0) THEN
224: j := l_gme_batch_steps.FIRST;
225: ELSE
226: j := l_gme_batch_steps.NEXT (j);
227: END IF;
228:

Line 226: j := l_gme_batch_steps.NEXT (j);

222:
223: IF (j = 0) THEN
224: j := l_gme_batch_steps.FIRST;
225: ELSE
226: j := l_gme_batch_steps.NEXT (j);
227: END IF;
228:
229: l_gme_batch_steps (j).batch_id := l_batch_id;
230: l_gme_batch_steps (j).routingstep_id :=

Line 229: l_gme_batch_steps (j).batch_id := l_batch_id;

225: ELSE
226: j := l_gme_batch_steps.NEXT (j);
227: END IF;
228:
229: l_gme_batch_steps (j).batch_id := l_batch_id;
230: l_gme_batch_steps (j).routingstep_id :=
231: p_recipe_rout_step_tbl (i).routingstep_id;
232: l_gme_batch_steps (j).batchstep_no :=
233: p_recipe_rout_step_tbl (i).routingstep_no;

Line 230: l_gme_batch_steps (j).routingstep_id :=

226: j := l_gme_batch_steps.NEXT (j);
227: END IF;
228:
229: l_gme_batch_steps (j).batch_id := l_batch_id;
230: l_gme_batch_steps (j).routingstep_id :=
231: p_recipe_rout_step_tbl (i).routingstep_id;
232: l_gme_batch_steps (j).batchstep_no :=
233: p_recipe_rout_step_tbl (i).routingstep_no;
234: l_gme_batch_steps (j).oprn_id := p_recipe_rout_step_tbl (i).oprn_id;

Line 232: l_gme_batch_steps (j).batchstep_no :=

228:
229: l_gme_batch_steps (j).batch_id := l_batch_id;
230: l_gme_batch_steps (j).routingstep_id :=
231: p_recipe_rout_step_tbl (i).routingstep_id;
232: l_gme_batch_steps (j).batchstep_no :=
233: p_recipe_rout_step_tbl (i).routingstep_no;
234: l_gme_batch_steps (j).oprn_id := p_recipe_rout_step_tbl (i).oprn_id;
235: l_gme_batch_steps (j).step_status := gme_common_pvt.g_step_pending;
236: l_gme_batch_steps (j).quality_status := 1;

Line 234: l_gme_batch_steps (j).oprn_id := p_recipe_rout_step_tbl (i).oprn_id;

230: l_gme_batch_steps (j).routingstep_id :=
231: p_recipe_rout_step_tbl (i).routingstep_id;
232: l_gme_batch_steps (j).batchstep_no :=
233: p_recipe_rout_step_tbl (i).routingstep_no;
234: l_gme_batch_steps (j).oprn_id := p_recipe_rout_step_tbl (i).oprn_id;
235: l_gme_batch_steps (j).step_status := gme_common_pvt.g_step_pending;
236: l_gme_batch_steps (j).quality_status := 1;
237: l_gme_batch_steps (j).delete_mark := 0;
238: l_gme_batch_steps (j).step_qty_um :=

Line 235: l_gme_batch_steps (j).step_status := gme_common_pvt.g_step_pending;

231: p_recipe_rout_step_tbl (i).routingstep_id;
232: l_gme_batch_steps (j).batchstep_no :=
233: p_recipe_rout_step_tbl (i).routingstep_no;
234: l_gme_batch_steps (j).oprn_id := p_recipe_rout_step_tbl (i).oprn_id;
235: l_gme_batch_steps (j).step_status := gme_common_pvt.g_step_pending;
236: l_gme_batch_steps (j).quality_status := 1;
237: l_gme_batch_steps (j).delete_mark := 0;
238: l_gme_batch_steps (j).step_qty_um :=
239: p_recipe_rout_step_tbl (i).process_qty_uom;

Line 236: l_gme_batch_steps (j).quality_status := 1;

232: l_gme_batch_steps (j).batchstep_no :=
233: p_recipe_rout_step_tbl (i).routingstep_no;
234: l_gme_batch_steps (j).oprn_id := p_recipe_rout_step_tbl (i).oprn_id;
235: l_gme_batch_steps (j).step_status := gme_common_pvt.g_step_pending;
236: l_gme_batch_steps (j).quality_status := 1;
237: l_gme_batch_steps (j).delete_mark := 0;
238: l_gme_batch_steps (j).step_qty_um :=
239: p_recipe_rout_step_tbl (i).process_qty_uom;
240: l_gme_batch_steps (j).max_step_capacity :=

Line 237: l_gme_batch_steps (j).delete_mark := 0;

233: p_recipe_rout_step_tbl (i).routingstep_no;
234: l_gme_batch_steps (j).oprn_id := p_recipe_rout_step_tbl (i).oprn_id;
235: l_gme_batch_steps (j).step_status := gme_common_pvt.g_step_pending;
236: l_gme_batch_steps (j).quality_status := 1;
237: l_gme_batch_steps (j).delete_mark := 0;
238: l_gme_batch_steps (j).step_qty_um :=
239: p_recipe_rout_step_tbl (i).process_qty_uom;
240: l_gme_batch_steps (j).max_step_capacity :=
241: p_recipe_rout_step_tbl (i).max_capacity;

Line 238: l_gme_batch_steps (j).step_qty_um :=

234: l_gme_batch_steps (j).oprn_id := p_recipe_rout_step_tbl (i).oprn_id;
235: l_gme_batch_steps (j).step_status := gme_common_pvt.g_step_pending;
236: l_gme_batch_steps (j).quality_status := 1;
237: l_gme_batch_steps (j).delete_mark := 0;
238: l_gme_batch_steps (j).step_qty_um :=
239: p_recipe_rout_step_tbl (i).process_qty_uom;
240: l_gme_batch_steps (j).max_step_capacity :=
241: p_recipe_rout_step_tbl (i).max_capacity;
242: l_gme_batch_steps (j).max_step_capacity_um :=

Line 240: l_gme_batch_steps (j).max_step_capacity :=

236: l_gme_batch_steps (j).quality_status := 1;
237: l_gme_batch_steps (j).delete_mark := 0;
238: l_gme_batch_steps (j).step_qty_um :=
239: p_recipe_rout_step_tbl (i).process_qty_uom;
240: l_gme_batch_steps (j).max_step_capacity :=
241: p_recipe_rout_step_tbl (i).max_capacity;
242: l_gme_batch_steps (j).max_step_capacity_um :=
243: p_recipe_rout_step_tbl (i).capacity_uom;
244: l_gme_batch_steps (j).minimum_transfer_qty :=

Line 242: l_gme_batch_steps (j).max_step_capacity_um :=

238: l_gme_batch_steps (j).step_qty_um :=
239: p_recipe_rout_step_tbl (i).process_qty_uom;
240: l_gme_batch_steps (j).max_step_capacity :=
241: p_recipe_rout_step_tbl (i).max_capacity;
242: l_gme_batch_steps (j).max_step_capacity_um :=
243: p_recipe_rout_step_tbl (i).capacity_uom;
244: l_gme_batch_steps (j).minimum_transfer_qty :=
245: p_recipe_rout_step_tbl (i).minimum_transfer_qty;
246:

Line 244: l_gme_batch_steps (j).minimum_transfer_qty :=

240: l_gme_batch_steps (j).max_step_capacity :=
241: p_recipe_rout_step_tbl (i).max_capacity;
242: l_gme_batch_steps (j).max_step_capacity_um :=
243: p_recipe_rout_step_tbl (i).capacity_uom;
244: l_gme_batch_steps (j).minimum_transfer_qty :=
245: p_recipe_rout_step_tbl (i).minimum_transfer_qty;
246:
247:
248: l_gme_batch_steps (j).plan_step_qty :=

Line 248: l_gme_batch_steps (j).plan_step_qty :=

244: l_gme_batch_steps (j).minimum_transfer_qty :=
245: p_recipe_rout_step_tbl (i).minimum_transfer_qty;
246:
247:
248: l_gme_batch_steps (j).plan_step_qty :=
249: p_recipe_rout_step_tbl (i).step_qty;
250:
251: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
252: gme_debug.put_line ('DURING INITIAL CREATION step number is '|| l_gme_batch_steps (j).batchstep_no);

Line 252: gme_debug.put_line ('DURING INITIAL CREATION step number is '|| l_gme_batch_steps (j).batchstep_no);

248: l_gme_batch_steps (j).plan_step_qty :=
249: p_recipe_rout_step_tbl (i).step_qty;
250:
251: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
252: gme_debug.put_line ('DURING INITIAL CREATION step number is '|| l_gme_batch_steps (j).batchstep_no);
253: gme_debug.put_line ('DURING INITIAL CREATION plan step qty from gmd is '|| l_gme_batch_steps (j).plan_step_qty);
254: END IF;
255:
256: l_gme_batch_steps (j).plan_start_date := gme_common_pvt.g_timestamp;

Line 253: gme_debug.put_line ('DURING INITIAL CREATION plan step qty from gmd is '|| l_gme_batch_steps (j).plan_step_qty);

249: p_recipe_rout_step_tbl (i).step_qty;
250:
251: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
252: gme_debug.put_line ('DURING INITIAL CREATION step number is '|| l_gme_batch_steps (j).batchstep_no);
253: gme_debug.put_line ('DURING INITIAL CREATION plan step qty from gmd is '|| l_gme_batch_steps (j).plan_step_qty);
254: END IF;
255:
256: l_gme_batch_steps (j).plan_start_date := gme_common_pvt.g_timestamp;
257: l_gme_batch_steps (j).plan_cmplt_date := gme_common_pvt.g_timestamp;

Line 256: l_gme_batch_steps (j).plan_start_date := gme_common_pvt.g_timestamp;

252: gme_debug.put_line ('DURING INITIAL CREATION step number is '|| l_gme_batch_steps (j).batchstep_no);
253: gme_debug.put_line ('DURING INITIAL CREATION plan step qty from gmd is '|| l_gme_batch_steps (j).plan_step_qty);
254: END IF;
255:
256: l_gme_batch_steps (j).plan_start_date := gme_common_pvt.g_timestamp;
257: l_gme_batch_steps (j).plan_cmplt_date := gme_common_pvt.g_timestamp;
258: l_gme_batch_steps (j).plan_charges := 0;
259:
260: IF p_gme_batch_header_rec.enforce_step_dependency = 1 THEN

Line 257: l_gme_batch_steps (j).plan_cmplt_date := gme_common_pvt.g_timestamp;

253: gme_debug.put_line ('DURING INITIAL CREATION plan step qty from gmd is '|| l_gme_batch_steps (j).plan_step_qty);
254: END IF;
255:
256: l_gme_batch_steps (j).plan_start_date := gme_common_pvt.g_timestamp;
257: l_gme_batch_steps (j).plan_cmplt_date := gme_common_pvt.g_timestamp;
258: l_gme_batch_steps (j).plan_charges := 0;
259:
260: IF p_gme_batch_header_rec.enforce_step_dependency = 1 THEN
261: l_gme_batch_steps (j).steprelease_type := 1;

Line 258: l_gme_batch_steps (j).plan_charges := 0;

254: END IF;
255:
256: l_gme_batch_steps (j).plan_start_date := gme_common_pvt.g_timestamp;
257: l_gme_batch_steps (j).plan_cmplt_date := gme_common_pvt.g_timestamp;
258: l_gme_batch_steps (j).plan_charges := 0;
259:
260: IF p_gme_batch_header_rec.enforce_step_dependency = 1 THEN
261: l_gme_batch_steps (j).steprelease_type := 1;
262: ELSE

Line 261: l_gme_batch_steps (j).steprelease_type := 1;

257: l_gme_batch_steps (j).plan_cmplt_date := gme_common_pvt.g_timestamp;
258: l_gme_batch_steps (j).plan_charges := 0;
259:
260: IF p_gme_batch_header_rec.enforce_step_dependency = 1 THEN
261: l_gme_batch_steps (j).steprelease_type := 1;
262: ELSE
263: l_gme_batch_steps (j).steprelease_type :=
264: p_recipe_rout_step_tbl (i).steprelease_type;
265: END IF; /*enforce_step_dependency = 1 */

Line 263: l_gme_batch_steps (j).steprelease_type :=

259:
260: IF p_gme_batch_header_rec.enforce_step_dependency = 1 THEN
261: l_gme_batch_steps (j).steprelease_type := 1;
262: ELSE
263: l_gme_batch_steps (j).steprelease_type :=
264: p_recipe_rout_step_tbl (i).steprelease_type;
265: END IF; /*enforce_step_dependency = 1 */
266:
267: IF p_step_due_date IS NULL THEN

Line 268: l_gme_batch_steps (j).due_date :=

264: p_recipe_rout_step_tbl (i).steprelease_type;
265: END IF; /*enforce_step_dependency = 1 */
266:
267: IF p_step_due_date IS NULL THEN
268: l_gme_batch_steps (j).due_date :=
269: l_gme_batch_steps (j).plan_cmplt_date;
270: ELSE
271: l_gme_batch_steps (j).due_date := p_step_due_date;
272: END IF;

Line 269: l_gme_batch_steps (j).plan_cmplt_date;

265: END IF; /*enforce_step_dependency = 1 */
266:
267: IF p_step_due_date IS NULL THEN
268: l_gme_batch_steps (j).due_date :=
269: l_gme_batch_steps (j).plan_cmplt_date;
270: ELSE
271: l_gme_batch_steps (j).due_date := p_step_due_date;
272: END IF;
273:

Line 271: l_gme_batch_steps (j).due_date := p_step_due_date;

267: IF p_step_due_date IS NULL THEN
268: l_gme_batch_steps (j).due_date :=
269: l_gme_batch_steps (j).plan_cmplt_date;
270: ELSE
271: l_gme_batch_steps (j).due_date := p_step_due_date;
272: END IF;
273:
274: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
275: gme_debug.put_line ( ' minimum_transfer_qty '

Line 276: || l_gme_batch_steps (j).minimum_transfer_qty);

272: END IF;
273:
274: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
275: gme_debug.put_line ( ' minimum_transfer_qty '
276: || l_gme_batch_steps (j).minimum_transfer_qty);
277: gme_debug.put_line ( ' max step capacity '
278: || l_gme_batch_steps (j).max_step_capacity);
279: gme_debug.put_line ( ' max step capacity uom '
280: || l_gme_batch_steps (j).max_step_capacity_um);

Line 278: || l_gme_batch_steps (j).max_step_capacity);

274: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
275: gme_debug.put_line ( ' minimum_transfer_qty '
276: || l_gme_batch_steps (j).minimum_transfer_qty);
277: gme_debug.put_line ( ' max step capacity '
278: || l_gme_batch_steps (j).max_step_capacity);
279: gme_debug.put_line ( ' max step capacity uom '
280: || l_gme_batch_steps (j).max_step_capacity_um);
281: END IF;
282:

Line 280: || l_gme_batch_steps (j).max_step_capacity_um);

276: || l_gme_batch_steps (j).minimum_transfer_qty);
277: gme_debug.put_line ( ' max step capacity '
278: || l_gme_batch_steps (j).max_step_capacity);
279: gme_debug.put_line ( ' max step capacity uom '
280: || l_gme_batch_steps (j).max_step_capacity_um);
281: END IF;
282:
283: -- Insert text if copy text is on and there is text on the step passed in...
284: -- Note... this should also work for insert step because an operation can have text

Line 290: 'gme_batch_steps' || '|' || TO_CHAR (l_batch_id)

286: IF (p_recipe_rout_step_tbl (i).text_code IS NOT NULL)
287: AND (gme_common_pvt.g_copy_routing_text_ind = 1) THEN
288: l_gmd_text_code := p_recipe_rout_step_tbl (i).text_code;
289: l_text_string :=
290: 'gme_batch_steps' || '|' || TO_CHAR (l_batch_id)
291: || '|';
292: l_text_string :=
293: l_text_string || l_gme_batch_steps (j).batchstep_no;
294: --Bug#5112133

Line 293: l_text_string || l_gme_batch_steps (j).batchstep_no;

289: l_text_string :=
290: 'gme_batch_steps' || '|' || TO_CHAR (l_batch_id)
291: || '|';
292: l_text_string :=
293: l_text_string || l_gme_batch_steps (j).batchstep_no;
294: --Bug#5112133
295: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
296: gme_debug.put_line ('text code for step=' || l_gmd_text_code);
297: gme_debug.put_line ('key_field for step=' || l_text_string);

Line 308: l_gme_batch_steps (j).text_code := l_gme_text_code;

304:
305: IF (l_return_status <> x_return_status) THEN
306: RAISE error_create_text;
307: ELSE
308: l_gme_batch_steps (j).text_code := l_gme_text_code;
309: END IF;
310: END IF;
311:
312: gmd_gme_int.check_qc(p_routingid => p_gme_batch_header_rec.routing_id,

Line 313: p_routingstepid => l_gme_batch_steps(j).routingstep_id,

309: END IF;
310: END IF;
311:
312: gmd_gme_int.check_qc(p_routingid => p_gme_batch_header_rec.routing_id,
313: p_routingstepid => l_gme_batch_steps(j).routingstep_id,
314: p_recipeid => l_recipe_id,
315: p_organization_id => p_gme_batch_header_rec.organization_id,
316: p_resultout => l_qc_status);
317: IF (l_qc_status = 'S') THEN

Line 318: l_gme_batch_steps(j).quality_status := 2;

314: p_recipeid => l_recipe_id,
315: p_organization_id => p_gme_batch_header_rec.organization_id,
316: p_resultout => l_qc_status);
317: IF (l_qc_status = 'S') THEN
318: l_gme_batch_steps(j).quality_status := 2;
319: END IF;
320:
321:
322: --FPBug#4395561 Start

Line 327: l_gme_batch_steps (j),

323: /* call create flex procedure to insert the default values of the BATCH_STEPS_DTL_FLEX
324: DFF's segments if they are enabled */
325: l_return_status := NULL;
326: gme_validate_flex_fld_pvt.create_flex_batch_step (
327: l_gme_batch_steps (j),
328: l_gme_batch_steps (j),
329: l_return_status);
330: IF l_return_status <> FND_API.g_ret_sts_success THEN
331: RAISE create_flex_failure;

Line 328: l_gme_batch_steps (j),

324: DFF's segments if they are enabled */
325: l_return_status := NULL;
326: gme_validate_flex_fld_pvt.create_flex_batch_step (
327: l_gme_batch_steps (j),
328: l_gme_batch_steps (j),
329: l_return_status);
330: IF l_return_status <> FND_API.g_ret_sts_success THEN
331: RAISE create_flex_failure;
332: END IF;

Line 335: IF (gme_batch_steps_dbl.insert_row

331: RAISE create_flex_failure;
332: END IF;
333: --FPBug#4395561 End
334:
335: IF (gme_batch_steps_dbl.insert_row
336: (p_batch_step => l_gme_batch_steps
337: (j)
338: ,x_batch_step => l_gme_batch_steps
339: (j) ) =

Line 336: (p_batch_step => l_gme_batch_steps

332: END IF;
333: --FPBug#4395561 End
334:
335: IF (gme_batch_steps_dbl.insert_row
336: (p_batch_step => l_gme_batch_steps
337: (j)
338: ,x_batch_step => l_gme_batch_steps
339: (j) ) =
340: TRUE) THEN

Line 338: ,x_batch_step => l_gme_batch_steps

334:
335: IF (gme_batch_steps_dbl.insert_row
336: (p_batch_step => l_gme_batch_steps
337: (j)
338: ,x_batch_step => l_gme_batch_steps
339: (j) ) =
340: TRUE) THEN
341: -- Keep the last batchstep_id produced... this is required for single step insert... since we don't
342: -- have the routingstep_id, we need this when linking the activities and resources back to the step.

Line 343: l_last_batchstep_id := l_gme_batch_steps (j).batchstep_id;

339: (j) ) =
340: TRUE) THEN
341: -- Keep the last batchstep_id produced... this is required for single step insert... since we don't
342: -- have the routingstep_id, we need this when linking the activities and resources back to the step.
343: l_last_batchstep_id := l_gme_batch_steps (j).batchstep_id;
344: l_step_charge_rsrc_tab (l_last_batchstep_id).resources :=
345: p_recipe_rout_step_tbl (j).resources;
346:
347: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN

Line 405: FROM gme_batch_steps

401: ,plan_cmplt_date
402: INTO l_gme_batch_step_activities (j).batchstep_id
403: ,l_gme_batch_step_activities (j).plan_start_date
404: ,l_gme_batch_step_activities (j).plan_cmplt_date
405: FROM gme_batch_steps
406: WHERE batch_id = l_batch_id
407: AND routingstep_id = p_recipe_rout_act_tbl (i).routingstep_id;
408: ELSE
409: SELECT batchstep_id

Line 415: FROM gme_batch_steps

411: ,plan_cmplt_date
412: INTO l_gme_batch_step_activities (j).batchstep_id
413: ,l_gme_batch_step_activities (j).plan_start_date
414: ,l_gme_batch_step_activities (j).plan_cmplt_date
415: FROM gme_batch_steps
416: WHERE batch_id = l_batch_id
417: AND batchstep_id = l_last_batchstep_id;
418: END IF;
419:

Line 581: FROM gme_batch_steps

577: ,plan_cmplt_date
578: INTO l_gme_batch_step_resources (j).batchstep_id
579: ,l_gme_batch_step_resources (j).plan_start_date
580: ,l_gme_batch_step_resources (j).plan_cmplt_date
581: FROM gme_batch_steps
582: WHERE batch_id = l_batch_id
583: AND routingstep_id = p_recipe_rout_resc_tbl (i).routingstep_id;
584: ELSE
585: SELECT batchstep_id

Line 591: FROM gme_batch_steps

587: ,plan_cmplt_date
588: INTO l_gme_batch_step_resources (j).batchstep_id
589: ,l_gme_batch_step_resources (j).plan_start_date
590: ,l_gme_batch_step_resources (j).plan_cmplt_date
591: FROM gme_batch_steps
592: WHERE batch_id = l_batch_id
593: AND batchstep_id = l_last_batchstep_id;
594: END IF;
595:

Line 697: FROM gme_batch_steps

693: -- Link this process parameters to the batch step it belongs to...
694: IF (p_resc_parameters_tbl (m).routingstep_id IS NOT NULL) THEN
695: SELECT batchstep_id
696: INTO l_gme_rsrc_parameters (m).batchstep_id
697: FROM gme_batch_steps
698: WHERE batch_id = l_batch_id
699: AND routingstep_id = p_resc_parameters_tbl (m).routingstep_id;
700: ELSE
701: SELECT batchstep_id

Line 703: FROM gme_batch_steps

699: AND routingstep_id = p_resc_parameters_tbl (m).routingstep_id;
700: ELSE
701: SELECT batchstep_id
702: INTO l_gme_rsrc_parameters (m).batchstep_id
703: FROM gme_batch_steps
704: WHERE batch_id = l_batch_id
705: AND batchstep_id = l_last_batchstep_id;
706: END IF;
707:

Line 801: FROM gme_batch_steps

797:
798: IF (p_recipe_rout_matl_tbl (i).routingstep_id IS NOT NULL) THEN
799: SELECT batchstep_id
800: INTO l_gme_batch_step_items (j).batchstep_id
801: FROM gme_batch_steps
802: WHERE batch_id = l_batch_id
803: AND routingstep_id = p_recipe_rout_matl_tbl (i).routingstep_id;
804: ELSE
805: l_gme_batch_step_items (j).batchstep_id := l_last_batchstep_id;

Line 922: FROM gme_batch_steps

918: l_gme_batch_step_dep (j).batch_id := l_batch_id;
919:
920: SELECT batchstep_id
921: INTO l_gme_batch_step_dep (j).batchstep_id
922: FROM gme_batch_steps
923: WHERE batch_id = l_batch_id
924: AND batchstep_no = p_routing_depd_tbl (i).routingstep_no;
925:
926: SELECT batchstep_id

Line 928: FROM gme_batch_steps

924: AND batchstep_no = p_routing_depd_tbl (i).routingstep_no;
925:
926: SELECT batchstep_id
927: INTO l_gme_batch_step_dep (j).dep_step_id
928: FROM gme_batch_steps
929: WHERE batch_id = l_batch_id
930: AND batchstep_no = p_routing_depd_tbl (i).dep_routingstep_no;
931:
932: l_gme_batch_step_dep (j).dep_type := p_routing_depd_tbl (i).dep_type;

Line 1009: -- Update the plan_step_qty in GME_BATCH_STEPS

1005: gme_debug.put_line ('done step calc...');
1006: gme_debug.put_line ('GO INTO LOOP TO RESET PLAN STEP QTY... ');
1007: END IF;
1008:
1009: -- Update the plan_step_qty in GME_BATCH_STEPS
1010: FOR i IN l_step_tbl.FIRST .. l_step_tbl.LAST LOOP
1011:
1012: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
1013: gme_debug.put_line ('step number is '|| l_step_tbl (i).step_no);

Line 1019: UPDATE gme_batch_steps

1015: gme_debug.put_line ('PLAN STEP QTY RNDED FROM GMD IS '|| ROUND (l_step_tbl (i).step_qty, 32));
1016: END IF;
1017:
1018: -- Round the step_qty, step_mass_qty, step_vol_qty to 32 decimal places.
1019: UPDATE gme_batch_steps
1020: SET plan_step_qty = ROUND (l_step_tbl (i).step_qty, 32)
1021: ,plan_mass_qty = ROUND (l_step_tbl (i).step_mass_qty, 32)
1022: ,mass_ref_um = l_step_tbl (i).step_mass_uom
1023: ,plan_volume_qty = ROUND (l_step_tbl (i).step_vol_qty, 32)

Line 1089: UPDATE gme_batch_steps

1085: || l_return_status);
1086: gme_debug.put_line (' charges ' || TO_CHAR (l_charge) );
1087: END IF;
1088:
1089: UPDATE gme_batch_steps
1090: SET plan_charges = l_charge
1091: WHERE batchstep_id = l_last_batchstep_id;
1092: ELSE
1093: update_charges (p_batch_id => l_batch_id

Line 1133: FROM gme_batch_steps

1129: AND p_recipe_rout_step_tbl (1).routingstep_id IS NULL) THEN
1130: -- This is an insert step... deal with only that new step...
1131: SELECT plan_step_qty, plan_charges
1132: INTO l_qty, l_plan_charges
1133: FROM gme_batch_steps
1134: WHERE batchstep_id = l_last_batchstep_id;
1135:
1136: -- Round the plan_rsrc_qty to 32 decimal places.
1137: UPDATE gme_batch_step_resources

Line 1385: UPDATE gme_batch_steps

1381: ('p_step_cmplt_date diff from l_step_plan_cmplt_date');
1382: END IF;
1383:
1384: IF (p_step_cmplt_date > l_step_plan_cmplt_date) THEN
1385: UPDATE gme_batch_steps
1386: SET plan_cmplt_date = p_step_cmplt_date
1387: ,last_updated_by = gme_common_pvt.g_user_ident
1388: ,last_update_date = gme_common_pvt.g_timestamp
1389: ,last_update_login = gme_common_pvt.g_login_id

Line 1512: ,p_event_key => l_gme_batch_steps (1).batchstep_id);

1508:
1509: IF ( p_recipe_rout_step_tbl.COUNT = 1
1510: AND p_recipe_rout_step_tbl (1).routingstep_id IS NULL) THEN
1511: wf_event.RAISE (p_event_name => gme_common_pvt.G_BATCHSTEP_CREATED
1512: ,p_event_key => l_gme_batch_steps (1).batchstep_id);
1513: END IF;
1514:
1515: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
1516: gme_debug.put_line

Line 1637: x_charge gme_batch_steps.plan_charges%TYPE;

1633: IS
1634: x_charge_tab charge_tab;
1635: x_num_steps PLS_INTEGER;
1636: l_return_status VARCHAR2 (1);
1637: x_charge gme_batch_steps.plan_charges%TYPE;
1638: l_api_name CONSTANT VARCHAR2 (30) := 'update charges';
1639:
1640: -- Cursor Definitions
1641: CURSOR cur_get_steps (v_batch_id NUMBER)

Line 1645: FROM gme_batch_steps

1641: CURSOR cur_get_steps (v_batch_id NUMBER)
1642: IS
1643: SELECT batchstep_id, plan_mass_qty, mass_ref_um, plan_volume_qty
1644: ,volume_ref_um
1645: FROM gme_batch_steps
1646: WHERE batch_id = v_batch_id;
1647:
1648: x_cur_step_rec cur_get_steps%ROWTYPE;
1649: error_calc_charge EXCEPTION;

Line 1705: UPDATE gme_batch_steps

1701: INTO x_cur_step_rec;
1702: END LOOP;
1703:
1704: FOR i IN 1 .. x_charge_tab.COUNT LOOP
1705: UPDATE gme_batch_steps
1706: SET plan_charges = x_charge_tab (i).charge
1707: WHERE batchstep_id = x_charge_tab (i).step_id;
1708: END LOOP;
1709:

Line 1755: FROM gme_batch_step_dependencies d, gme_batch_steps r

1751: CURSOR cur_get_step_date_4_cal (v_step_id NUMBER, v_batch_id NUMBER)
1752: IS
1753: SELECT dep_type, r.plan_start_date, r.plan_cmplt_date
1754: ,standard_delay
1755: FROM gme_batch_step_dependencies d, gme_batch_steps r
1756: WHERE d.batch_id = r.batch_id
1757: AND d.batch_id = v_batch_id
1758: AND r.batchstep_id = d.dep_step_id
1759: AND d.batchstep_id = v_step_id;

Line 1766: FROM gme_batch_step_dependencies d, gme_batch_steps r

1762: IS
1763: SELECT MAX (DECODE (dep_type
1764: ,1, r.plan_start_date + standard_delay / 24
1765: ,0, r.plan_cmplt_date + standard_delay / 24) )
1766: FROM gme_batch_step_dependencies d, gme_batch_steps r
1767: WHERE d.batch_id = r.batch_id
1768: AND d.batch_id = v_batch_id
1769: AND r.batchstep_id = d.dep_step_id
1770: AND d.batchstep_id = v_step_id;

Line 2063: ,p_step_id IN gme_batch_steps.batchstep_id%TYPE

2059: p_gme_batch_header_rec IN gme_batch_header%ROWTYPE
2060: ,p_use_workday_cal IN VARCHAR2
2061: ,p_contiguity_override IN VARCHAR2
2062: ,p_return_status OUT NOCOPY VARCHAR2
2063: ,p_step_id IN gme_batch_steps.batchstep_id%TYPE
2064: DEFAULT NULL
2065: ,p_plan_start_date IN DATE DEFAULT NULL
2066: ,p_plan_cmplt_date IN DATE DEFAULT NULL)
2067: IS

Line 2076: x_step_row gme_batch_steps%ROWTYPE;

2072: x_act_row gme_batch_step_activities%ROWTYPE;
2073: x_rsrc_tab resources_tab;
2074: x_rsrc_row gme_batch_step_resources%ROWTYPE;
2075: x_rsrc_txns_tab rsrc_txns_tab;
2076: x_step_row gme_batch_steps%ROWTYPE;
2077: x_max_act_date DATE;
2078: x_max_rsrc_date DATE;
2079: l_return_status VARCHAR2 (1);
2080: x_routing_id gme_batch_header.routing_id%TYPE;

Line 2086: x_step_no gme_batch_steps.batchstep_no%TYPE;

2082: l_batch_id gme_batch_header.batch_id%TYPE;
2083: x_batch_duration NUMBER;
2084: x_batch_start_date DATE;
2085: x_step_start_date DATE;
2086: x_step_no gme_batch_steps.batchstep_no%TYPE;
2087: max_cmplt_date DATE;
2088: min_start_date DATE;
2089: l_usage_hrs gme_batch_step_resources.plan_rsrc_usage%TYPE;
2090: l_batchstep_activity_id NUMBER;

Line 2113: FROM gme_batch_steps

2109:
2110: CURSOR cur_get_step_id (v_step NUMBER, v_batch_id NUMBER)
2111: IS
2112: SELECT batchstep_id
2113: FROM gme_batch_steps
2114: WHERE batch_id = v_batch_id AND batchstep_no = v_step;
2115:
2116: CURSOR cur_get_step (v_batchstep_id NUMBER)
2117: IS

Line 2119: FROM gme_batch_steps

2115:
2116: CURSOR cur_get_step (v_batchstep_id NUMBER)
2117: IS
2118: SELECT batchstep_no
2119: FROM gme_batch_steps
2120: WHERE batchstep_id = v_batchstep_id;
2121:
2122: CURSOR cur_get_activity (v_batchstep_activity_id NUMBER)
2123: IS

Line 2224: FROM gme_batch_steps

2220: x_gmd_step_tbl (1).step_id := p_step_id;
2221:
2222: SELECT batchstep_no
2223: INTO x_gmd_step_tbl (1).step_no
2224: FROM gme_batch_steps
2225: WHERE batchstep_id = p_step_id;
2226: END IF;
2227:
2228: -- Calculate the duration of each step...

Line 2256: FROM gme_batch_steps

2252: -- If both dates are null, that's OK too, the code below will use the batch plan start date.
2253: IF (p_plan_start_date IS NULL) AND (p_plan_cmplt_date IS NOT NULL) THEN
2254: SELECT batchstep_no
2255: INTO x_step_no
2256: FROM gme_batch_steps
2257: WHERE batchstep_id = p_step_id;
2258:
2259: IF l_use_workday_cal = fnd_api.g_true THEN
2260: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN

Line 2472: FROM gme_batch_steps

2468: /* Calculate the dates for all the rows in X_step_tbl */
2469: FOR i IN x_step_tbl.FIRST .. x_step_tbl.LAST LOOP
2470: SELECT *
2471: INTO x_step_row
2472: FROM gme_batch_steps
2473: WHERE batchstep_id = x_step_tbl(i);
2474:
2475: IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
2476: gme_debug.put_line ('step_no=' || x_step_row.batchstep_no); -- Bug 13582990

Line 2739: UPDATE gme_batch_steps

2735: ,plan_cmplt_date = x_act_tab (k).plan_cmplt_date
2736: WHERE batchstep_activity_id = x_act_tab (k).batchstep_activity_id;
2737: END LOOP;
2738:
2739: UPDATE gme_batch_steps
2740: SET plan_start_date = x_step_row.plan_start_date
2741: ,plan_cmplt_date = x_step_row.plan_cmplt_date
2742: ,due_date = x_step_row.due_date
2743: WHERE batchstep_id = x_step_row.batchstep_id;

Line 2751: FROM gme_batch_steps

2747: IF (p_step_id IS NULL) THEN
2748: -- not a single step insert... however, that should also be considered for updating the header dates...
2749: SELECT MAX (plan_cmplt_date)
2750: INTO max_cmplt_date
2751: FROM gme_batch_steps
2752: WHERE batch_id = l_batch_id;
2753:
2754: SELECT MIN (plan_start_date)
2755: INTO min_start_date

Line 2756: FROM gme_batch_steps

2752: WHERE batch_id = l_batch_id;
2753:
2754: SELECT MIN (plan_start_date)
2755: INTO min_start_date
2756: FROM gme_batch_steps
2757: WHERE batch_id = l_batch_id;
2758:
2759: IF p_gme_batch_header_rec.batch_status = 2 THEN
2760: -- Pawan Kumar made following changes for bug 5015873

Line 2887: FROM gme_batch_steps

2883: x_return_status OUT NOCOPY VARCHAR2) IS
2884:
2885: CURSOR cur_get_leaf_nodes (v_batch_id NUMBER) IS
2886: SELECT batchstep_id, batchstep_no
2887: FROM gme_batch_steps
2888: WHERE batch_id = v_batch_id
2889: AND batchstep_id NOT IN (SELECT dep_step_id
2890: FROM gme_batch_step_dependencies
2891: WHERE batch_id = v_batch_id);

Line 2907: (SELECT * FROM gme_batch_steps WHERE batch_id = v_batch_id) s,

2903: CURSOR Cur_get_branches(v_batch_id NUMBER, v_batchstep_id NUMBER) IS
2904: SELECT branch, LENGTH(branch) sz
2905: FROM (SELECT REPLACE(sys_connect_by_path(LPAD(s.batchstep_no, 5, 0)||LPAD(p.batchstep_no, 5, 0 )||dep_type||LPAD(standard_delay, 3,0),' '), ' ', NULL) branch
2906: FROM (SELECT * FROM gme_batch_step_dependencies WHERE batch_id = v_batch_id) d,
2907: (SELECT * FROM gme_batch_steps WHERE batch_id = v_batch_id) s,
2908: (SELECT * FROM gme_batch_steps WHERE batch_id = v_batch_id) p
2909: WHERE s.batchstep_id = d.batchstep_id
2910: AND p.batchstep_id(+) = d.dep_step_id
2911: AND connect_by_isleaf = 1

Line 2908: (SELECT * FROM gme_batch_steps WHERE batch_id = v_batch_id) p

2904: SELECT branch, LENGTH(branch) sz
2905: FROM (SELECT REPLACE(sys_connect_by_path(LPAD(s.batchstep_no, 5, 0)||LPAD(p.batchstep_no, 5, 0 )||dep_type||LPAD(standard_delay, 3,0),' '), ' ', NULL) branch
2906: FROM (SELECT * FROM gme_batch_step_dependencies WHERE batch_id = v_batch_id) d,
2907: (SELECT * FROM gme_batch_steps WHERE batch_id = v_batch_id) s,
2908: (SELECT * FROM gme_batch_steps WHERE batch_id = v_batch_id) p
2909: WHERE s.batchstep_id = d.batchstep_id
2910: AND p.batchstep_id(+) = d.dep_step_id
2911: AND connect_by_isleaf = 1
2912: START WITH d.batchstep_id = v_batchstep_id

Line 3034: l_step_no gme_batch_steps.batchstep_no%TYPE;

3030: l_step_duration_tab IN step_duration_tab,
3031: x_batch_duration OUT NOCOPY NUMBER,
3032: x_return_status OUT NOCOPY VARCHAR2
3033: ) IS
3034: l_step_no gme_batch_steps.batchstep_no%TYPE;
3035: l_dep_step_no gme_batch_steps.batchstep_no%TYPE;
3036: l_leaf_nodes step_tab;
3037:
3038: l_count NUMBER := 0;

Line 3035: l_dep_step_no gme_batch_steps.batchstep_no%TYPE;

3031: x_batch_duration OUT NOCOPY NUMBER,
3032: x_return_status OUT NOCOPY VARCHAR2
3033: ) IS
3034: l_step_no gme_batch_steps.batchstep_no%TYPE;
3035: l_dep_step_no gme_batch_steps.batchstep_no%TYPE;
3036: l_leaf_nodes step_tab;
3037:
3038: l_count NUMBER := 0;
3039: i PLS_INTEGER;

Line 3056: FROM gme_batch_steps

3052: l_api_name CONSTANT VARCHAR2 (30) := 'Calc longest time';
3053:
3054: CURSOR cur_get_leaf_nodes (v_batch_id NUMBER) IS
3055: SELECT batchstep_id
3056: FROM gme_batch_steps
3057: WHERE batch_id = v_batch_id AND
3058: batchstep_id NOT IN (SELECT dep_step_id
3059: FROM gme_batch_step_dependencies
3060: WHERE batch_id = v_batch_id);

Line 3061: CURSOR cur_get_step_no (v_step_id gme_batch_steps.batchstep_id%TYPE) IS

3057: WHERE batch_id = v_batch_id AND
3058: batchstep_id NOT IN (SELECT dep_step_id
3059: FROM gme_batch_step_dependencies
3060: WHERE batch_id = v_batch_id);
3061: CURSOR cur_get_step_no (v_step_id gme_batch_steps.batchstep_id%TYPE) IS
3062: SELECT batchstep_no
3063: FROM gme_batch_steps
3064: WHERE batchstep_id = v_step_id;
3065:

Line 3063: FROM gme_batch_steps

3059: FROM gme_batch_step_dependencies
3060: WHERE batch_id = v_batch_id);
3061: CURSOR cur_get_step_no (v_step_id gme_batch_steps.batchstep_id%TYPE) IS
3062: SELECT batchstep_no
3063: FROM gme_batch_steps
3064: WHERE batchstep_id = v_step_id;
3065:
3066: l_brch_leaf_cnt NUMBER := 0;
3067: l_leaf_nodeid NUMBER := 0;

Line 3173: (SELECT * FROM gme_batch_steps WHERE batch_id = v_batch_id) s,

3169: -- Bug 9862326 - This cursor will fetch all delays related to a given step including dependent steps.
3170: CURSOR cur_get_step_delay (v_batch_id NUMBER, v_batchstep_id NUMBER) IS
3171: SELECT REPLACE(sys_connect_by_path(dep_type||';'||d.dep_step_id||';'||standard_delay||';',' '), ' ', NULL) branch
3172: FROM (SELECT * FROM gme_batch_step_dependencies WHERE batch_id = v_batch_id) d,
3173: (SELECT * FROM gme_batch_steps WHERE batch_id = v_batch_id) s,
3174: (SELECT * FROM gme_batch_steps WHERE batch_id = v_batch_id) p
3175: WHERE s.batchstep_id = d.batchstep_id
3176: AND p.batchstep_id(+) = d.dep_step_id
3177: AND connect_by_isleaf = 1

Line 3174: (SELECT * FROM gme_batch_steps WHERE batch_id = v_batch_id) p

3170: CURSOR cur_get_step_delay (v_batch_id NUMBER, v_batchstep_id NUMBER) IS
3171: SELECT REPLACE(sys_connect_by_path(dep_type||';'||d.dep_step_id||';'||standard_delay||';',' '), ' ', NULL) branch
3172: FROM (SELECT * FROM gme_batch_step_dependencies WHERE batch_id = v_batch_id) d,
3173: (SELECT * FROM gme_batch_steps WHERE batch_id = v_batch_id) s,
3174: (SELECT * FROM gme_batch_steps WHERE batch_id = v_batch_id) p
3175: WHERE s.batchstep_id = d.batchstep_id
3176: AND p.batchstep_id(+) = d.dep_step_id
3177: AND connect_by_isleaf = 1
3178: START WITH d.batchstep_id = v_batchstep_id

Line 3184: FROM gme_batch_steps

3180:
3181: -- Bug 10226452
3182: CURSOR cur_get_step_no (v_batch_id NUMBER, v_batchstep_id NUMBER) IS
3183: SELECT batchstep_no
3184: FROM gme_batch_steps
3185: WHERE batchstep_id = v_batchstep_id;
3186: BEGIN
3187:
3188: IF (NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT) THEN

Line 3193: from gme_batch_step_dependencies d, gme_batch_steps s

3189: gme_debug.put_line ('entering get_longest_in_branch with batchstep_id '||node);
3190: END IF;
3191:
3192: for curnode in (select d.dep_step_id, dep_type, standard_delay, s.batchstep_no, s.batch_id
3193: from gme_batch_step_dependencies d, gme_batch_steps s
3194: where s.batchstep_id = d.batchstep_id and d.batchstep_id = node)
3195: loop
3196: /* initialize step duration */
3197: subnodes_found := 1;

Line 3309: from gme_batch_steps

3305: end if;
3306: end loop;
3307: IF subnodes_found = 0 THEN
3308: select batchstep_no into leaf_subnode_stepno
3309: from gme_batch_steps
3310: where batchstep_id = node;
3311: long_in_branch := l_step_duration_tab(leaf_subnode_stepno);
3312: END IF;
3313: IF (NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT) THEN

Line 3416: FROM gme_batch_steps

3412: /* Calculate the step quantities for all the rows in X_step_tbl */
3413: FOR i IN 1 .. x_step_rows LOOP
3414: SELECT plan_step_qty
3415: INTO x_step_qty
3416: FROM gme_batch_steps
3417: WHERE batchstep_no = p_step_tbl (i).step_no
3418: AND batch_id = p_parent_id;
3419:
3420: x_step_qty := x_step_qty * x_scale_factor;