269: IS
270: SELECT gsr.batchstep_resource_id, 1 sds_type, gst.seq_dep_id
271: FROM gme_batch_header gbh
272: ,gmd_recipe_validity_rules gvr
273: ,gme_batch_steps gbs
274: ,gme_batch_step_activities gsa
275: ,gme_batch_step_resources gsr
276: ,cr_rsrc_dtl crd
277: ,ic_item_mst iim
292: UNION ALL
293: SELECT gsr2.batchstep_resource_id, 2 sds_type, gst2.seq_dep_id
294: FROM gme_batch_header gbh2
295: ,gmd_recipe_validity_rules gvr2
296: ,gme_batch_steps gbs2
297: ,gme_batch_step_activities gsa2
298: ,gme_batch_step_resources gsr2
299: ,cr_rsrc_dtl crd2
300: ,gmp_sequence_types gst2
429:
430: CURSOR cur_get_batchstep_ids (v_batch_id NUMBER)
431: IS
432: SELECT batchstep_id
433: FROM gme_batch_steps
434: WHERE batch_id = v_batch_id;
435:
436: CURSOR cur_is_charge_associated (
437: v_batch_id NUMBER
549:
550: CURSOR cur_get_batchstep_ids (v_batch_id NUMBER)
551: IS
552: SELECT batchstep_id
553: FROM gme_batch_steps
554: WHERE batch_id = v_batch_id;
555:
556: CURSOR cur_is_charge_associated (
557: v_batch_id NUMBER
675: Rishi Varma B3718176 14-07-2004
676: Created.
677: =============================================================================================*/
678: PROCEDURE calc_activity_sequence_number (
679: p_batchstep_id IN gme_batch_steps.batchstep_id%TYPE
680: ,p_resources IN gme_batch_step_resources.resources%TYPE
681: ,x_act_seq_num OUT NOCOPY NUMBER
682: ,x_return_status OUT NOCOPY VARCHAR2)
683: IS
682: ,x_return_status OUT NOCOPY VARCHAR2)
683: IS
684: CURSOR cur_get_seq_dep_ind (
685: v_resources gme_batch_step_resources.resources%TYPE
686: ,v_batchstep_id gme_batch_steps.batchstep_id%TYPE)
687: IS
688: SELECT MIN (a.sequence_dependent_ind)
689: FROM gme_batch_step_activities a, gme_batch_step_resources r
690: WHERE r.resources = v_resources