[Home] [Help]
47: l_error_count NUMBER;
48: l_row_count NUMBER;
49: l_return_status VARCHAR2 (1);
50: l_ins_history gme_batch_history%ROWTYPE;
51: l_batch_step gme_batch_steps%ROWTYPE;
52: l_batch_steps_tab gme_close_batch_pvt.step_details_tab;
53: l_batch_header gme_batch_header%ROWTYPE;
54: l_in_batch_header gme_batch_header%ROWTYPE;
55: l_material_detail_ids gme_common_pvt.number_tab;
116: FROM gme_material_details
117: WHERE batch_id = v_batch_id
118: FOR UPDATE OF actual_qty NOWAIT;
119:
120: CURSOR cur_gme_batch_steps
121: IS
122: SELECT COUNT (*)
123: FROM gme_batch_steps
124: WHERE step_status < 4 AND batch_id = x_batch_header_rec.batch_id;
119:
120: CURSOR cur_gme_batch_steps
121: IS
122: SELECT COUNT (*)
123: FROM gme_batch_steps
124: WHERE step_status < 4 AND batch_id = x_batch_header_rec.batch_id;
125:
126: /* siva FPbug#4684029 */
127: CURSOR cur_get_prod (v_batch_id NUMBER)
185: -- Bug 8636368 - This following validation is not required when closing steps.
186: /* Bharati Satpute Bug2395188 Added check for enforce step dependency */
187: /* IF x_batch_header_rec.poc_ind = 'Y' THEN
188: IF x_batch_header_rec.enforce_step_dependency = 1 THEN
189: OPEN cur_gme_batch_steps;
190:
191: FETCH cur_gme_batch_steps
192: INTO l_step_count;
193:
187: /* IF x_batch_header_rec.poc_ind = 'Y' THEN
188: IF x_batch_header_rec.enforce_step_dependency = 1 THEN
189: OPEN cur_gme_batch_steps;
190:
191: FETCH cur_gme_batch_steps
192: INTO l_step_count;
193:
194: CLOSE cur_gme_batch_steps;
195:
190:
191: FETCH cur_gme_batch_steps
192: INTO l_step_count;
193:
194: CLOSE cur_gme_batch_steps;
195:
196: IF l_step_count > 0 THEN
197: RAISE steps_not_closed; */
198: -- END IF; /*l_step_count > 0*/
563: IS
564: CURSOR cur_batch_steps (v_batch_id NUMBER)
565: IS
566: SELECT step_close_date
567: FROM gme_batch_steps
568: WHERE batch_id IN (
569: SELECT DISTINCT batch_id
570: FROM gme_material_details
571: START WITH batch_id =
798:
799: CURSOR cur_get_step_rec (v_batch_id NUMBER, v_step_id NUMBER)
800: IS
801: SELECT *
802: FROM gme_batch_steps
803: WHERE batch_id = v_batch_id AND batchstep_id = v_step_id;
804:
805: CURSOR cur_get_final_steps (v_batch_id NUMBER)
806: IS
804:
805: CURSOR cur_get_final_steps (v_batch_id NUMBER)
806: IS
807: SELECT *
808: FROM gme_batch_steps s
809: WHERE s.batch_id = v_batch_id
810: AND s.batchstep_id NOT IN (SELECT dep_step_id
811: FROM gme_batch_step_dependencies
812: WHERE batch_id = v_batch_id)
813: ORDER BY batchstep_no;
814:
815: /* Buffer records for database read.
816: ===================================*/
817: l_step_rec gme_batch_steps%ROWTYPE;
818: /* Exceptions.
819: =====================*/
820: no_routing_associated EXCEPTION;
821: step_details_missing EXCEPTION;