734:
735: l_batch_id number;
736:
737: cursor get_batch_id_for_step is select batch_id from gme_batch_steps where batchstep_id = p_entity_key;
738: cursor get_batch_id_for_resource is select batch_id from gme_batch_step_resources where batchstep_resource_id = p_entity_key;
739: cursor get_batch_id_for_activity is select batch_id from gme_batch_step_activities where batchstep_activity_id = p_entity_key;
740: cursor get_batch_id_for_material is select batch_id from gme_material_details where material_detail_id = p_entity_key;
741:
742: NO_BATCH_FOUND_ERR exception;
825:
826: l_batchstep_id number;
827: l_batch_operation varchar2(1000);
828:
829: cursor get_batchstep_id_for_resource is select batchstep_id from gme_batch_step_resources where batchstep_resource_id = p_entity_key;
830: cursor get_batchstep_id_for_activity is select batchstep_id from gme_batch_step_activities where batchstep_activity_id = p_entity_key;
831: cursor get_batchstep_id_for_material is select batchstep_id from gme_batch_step_items where material_detail_id = p_entity_key;
832:
833: NO_BATCHSTEP_FOUND_ERR exception;
956:
957: cursor get_activity is select batchstep_activity_id from gme_batch_step_activities where batchstep_id = l_batchstep_id and oprn_line_id = l_oprn_line_id;
958: cursor get_min_activity is select min(batchstep_activity_id) from gme_batch_step_activities where batchstep_id = l_batchstep_id;
959:
960: cursor get_resource is select batchstep_resource_id from gme_batch_step_resources where batchstep_activity_id = l_batchstep_activity_id and resources = l_resources;
961: cursor get_min_resource is select min(batchstep_resource_id) from gme_batch_step_resources where batchstep_activity_id = l_batchstep_activity_id;
962:
963: cursor get_param is select process_param_id from gme_process_parameters where batchstep_resource_id = l_batchstep_resource_id and parameter_id = l_param_id;
964: cursor get_min_param is select (process_param_id) from gme_process_parameters where batchstep_resource_id = l_batchstep_resource_id;
957: cursor get_activity is select batchstep_activity_id from gme_batch_step_activities where batchstep_id = l_batchstep_id and oprn_line_id = l_oprn_line_id;
958: cursor get_min_activity is select min(batchstep_activity_id) from gme_batch_step_activities where batchstep_id = l_batchstep_id;
959:
960: cursor get_resource is select batchstep_resource_id from gme_batch_step_resources where batchstep_activity_id = l_batchstep_activity_id and resources = l_resources;
961: cursor get_min_resource is select min(batchstep_resource_id) from gme_batch_step_resources where batchstep_activity_id = l_batchstep_activity_id;
962:
963: cursor get_param is select process_param_id from gme_process_parameters where batchstep_resource_id = l_batchstep_resource_id and parameter_id = l_param_id;
964: cursor get_min_param is select (process_param_id) from gme_process_parameters where batchstep_resource_id = l_batchstep_resource_id;
965:
1214: routingstep_id,
1215: oprn_line_id,
1216: resources ,
1217: gbsa.activity || '-' || resources
1218: from gme_batch_step_resources gbsr,
1219: gme_batch_step_Activities gbsa,
1220: gme_batch_steps gbs
1221: where gbsa.batchstep_activity_id = gbsr.batchstep_activity_id
1222: and gbsa.batchstep_id = gbs.batchstep_id and gbsr.batch_id = p_entity_key;
1599:
1600: cursor get_activity_detail is select batch_id, batchstep_id, batchstep_activity_id from gme_batch_step_activities where batchstep_id = l_batchstep_id and oprn_line_id = l_oprn_line_id;
1601: cursor get_activity_detail_from_id is select batch_id, batchstep_id, batchstep_activity_id from gme_batch_step_activities where batchstep_activity_id = l_batchstep_activity_id;
1602:
1603: cursor get_resource_detail is select batch_id, batchstep_id, batchstep_activity_id, batchstep_resource_id from gme_batch_step_resources where batchstep_activity_id = l_batchstep_activity_id and resources = l_resources;
1604: cursor get_resource_detail_from_id is select batch_id, batchstep_id, batchstep_activity_id, batchstep_resource_id from gme_batch_step_resources where batchstep_resource_id = l_batchstep_resource_id;
1605:
1606: cursor get_param_detail is select batch_id, batchstep_id, batchstep_activity_id, batchstep_resource_id, process_param_id from gme_process_parameters where batchstep_resource_id = l_batchstep_resource_id and parameter_id = l_param_id;
1607: cursor get_param_detail_from_id is select batch_id, batchstep_id, batchstep_activity_id, batchstep_resource_id, process_param_id from gme_process_parameters where process_param_id = l_process_param_id;
1600: cursor get_activity_detail is select batch_id, batchstep_id, batchstep_activity_id from gme_batch_step_activities where batchstep_id = l_batchstep_id and oprn_line_id = l_oprn_line_id;
1601: cursor get_activity_detail_from_id is select batch_id, batchstep_id, batchstep_activity_id from gme_batch_step_activities where batchstep_activity_id = l_batchstep_activity_id;
1602:
1603: cursor get_resource_detail is select batch_id, batchstep_id, batchstep_activity_id, batchstep_resource_id from gme_batch_step_resources where batchstep_activity_id = l_batchstep_activity_id and resources = l_resources;
1604: cursor get_resource_detail_from_id is select batch_id, batchstep_id, batchstep_activity_id, batchstep_resource_id from gme_batch_step_resources where batchstep_resource_id = l_batchstep_resource_id;
1605:
1606: cursor get_param_detail is select batch_id, batchstep_id, batchstep_activity_id, batchstep_resource_id, process_param_id from gme_process_parameters where batchstep_resource_id = l_batchstep_resource_id and parameter_id = l_param_id;
1607: cursor get_param_detail_from_id is select batch_id, batchstep_id, batchstep_activity_id, batchstep_resource_id, process_param_id from gme_process_parameters where process_param_id = l_process_param_id;
1608:
2112: cursor c_get_steps is select batchstep_id from gme_batch_steps where batch_id = p_entity_key;
2113:
2114: cursor c_get_activities is select batchstep_activity_id from gme_batch_step_activities where batch_id = p_entity_key;
2115:
2116: cursor c_get_resources is select batchstep_resource_id from gme_batch_step_resources where batch_id = p_entity_key;
2117:
2118: cursor c_get_materials is select material_detail_id from gme_material_details where batch_id = p_entity_key;
2119:
2120:
2118: cursor c_get_materials is select material_detail_id from gme_material_details where batch_id = p_entity_key;
2119:
2120:
2121: cursor c_get_step_activities is select batchstep_activity_id from gme_batch_step_activities where batchstep_id = p_entity_key;
2122: cursor c_get_step_resources is select batchstep_resource_id from gme_batch_step_resources where batchstep_id = p_entity_key;
2123:
2124: cursor c_get_step_material is select material_detail_id from gme_batch_step_items where batchstep_id = p_entity_key;
2125:
2126: cursor c_get_activity_resources is select batchstep_resource_id from gme_batch_step_resources where batchstep_activity_id = l_batchstep_activity_id;
2122: cursor c_get_step_resources is select batchstep_resource_id from gme_batch_step_resources where batchstep_id = p_entity_key;
2123:
2124: cursor c_get_step_material is select material_detail_id from gme_batch_step_items where batchstep_id = p_entity_key;
2125:
2126: cursor c_get_activity_resources is select batchstep_resource_id from gme_batch_step_resources where batchstep_activity_id = l_batchstep_activity_id;
2127:
2128:
2129: BEGIN
2130:
2742: l_step_status number;
2743: cursor is_step_locked is select count(*) from gmo_batch_step_lock_details where batchstep_id = l_batchstep_id;
2744: cursor is_step_locked_by is select count(*) from gmo_batch_step_lock_details where batchstep_id = l_batchstep_id and lock_requester = P_REQUESTER;
2745:
2746: cursor get_step_id_for_resource is select batchstep_id from gme_batch_step_resources where batchstep_resource_id = p_entity_key;
2747: cursor get_step_id_for_activity is select batchstep_id from gme_batch_step_activities where batchstep_activity_id = p_entity_key;
2748: cursor get_step_id_for_material is select batchstep_id from gme_batch_step_items where material_detail_id = p_entity_key;
2749:
2750: cursor get_step_detail is select step_status from gme_batch_steps where batchstep_id = l_batchstep_id;
2915: gme_batch_step_activities where batchstep_id=P_BATCHSTEP_ID and batch_id =
2916: P_BATCH_ID;
2917:
2918: cursor c_get_resource is select resources, batchstep_resource_id from
2919: gme_batch_step_resources where batchstep_id=P_BATCHSTEP_ID and batch_id =
2920: P_BATCH_ID and batchstep_activity_id = l_batchstep_activity_id;
2921:
2922: cursor c_get_material is select e.Concatenated_segments, a.material_detail_id
2923: from gme_material_details a, gme_batch_step_items b, MTL_SYSTEM_ITEMS_KFV e
3117: routingstep_id,
3118: oprn_line_id,
3119: resources ,
3120: gbsa.activity || '-' || resources
3121: from gme_batch_step_resources gbsr,
3122: gme_batch_step_Activities gbsa,
3123: gme_batch_steps gbs
3124: where gbsa.batchstep_activity_id = gbsr.batchstep_activity_id
3125: and gbsa.batchstep_id = gbs.batchstep_id and gbsr.batch_id = p_entity_key;