The following lines contain the word 'select', 'insert', 'update' or 'delete':
g_pkg_name CONSTANT VARCHAR2 (30) := 'GME_API_INSERT_STEP';
PROCEDURE insert_batch_step (
p_gme_batch_header IN gme_batch_header%ROWTYPE
,p_gme_batch_step IN gme_batch_steps%ROWTYPE
,x_gme_batch_step OUT NOCOPY gme_batch_steps%ROWTYPE
,x_return_status OUT NOCOPY VARCHAR2)
IS
CURSOR get_steps_count (v_batchstep_no NUMBER, v_batch_id NUMBER)
IS
SELECT COUNT (*)
FROM gme_batch_steps
WHERE batch_id = v_batch_id
AND batchstep_no = v_batchstep_no
AND delete_mark = 0;
SELECT organization_code
FROM mtl_parameters
WHERE organization_id = p_org_id ;
SELECT conversion_rate, uom_class
FROM mtl_uom_conversions
WHERE uom_code = v_um_code
AND inventory_item_id = 0;
SELECT 1
FROM sys.DUAL
WHERE EXISTS ( SELECT 1
FROM gme_text_header
WHERE text_code = v_text_code);
batch_step_update_error EXCEPTION;
gme_debug.put_line ('Begin Insert_Batch_Step');
( 'Insert_Batch_Step... GMD_FETCH_OPRN.FETCH_OPRN returned '
|| l_recipe_rout_act.COUNT
|| ' ACTIVITIES');
( 'Insert_Batch_Step... GMD_FETCH_OPRN.FETCH_OPRN returned '
|| l_recipe_rout_resc.COUNT
|| ' RESOURCES');
( 'Insert_Batch_Step... GMD_FETCH_OPRN.FETCH_OPRN returned '
|| l_recipe_rout_act (i).oprn_id
|| ' operation_id');
( 'Insert_Batch_Step... GMD_FETCH_OPRN.FETCH_OPRN returned '
|| l_recipe_rout_act (i).minimum_transfer_qty
|| ' minimum_transfer_qty at Activity '||l_recipe_rout_act (i).activity);
('Insert_Batch Step - GMD_FETCH_OPRN.FETCH_OPRN returned no activities');
('Insert_Batch Step - GMD_FETCH_OPRN.FETCH_OPRN returned no resources');
SELECT minimum_transfer_qty, process_qty_uom
INTO l_recipe_rout_step (1).minimum_transfer_qty,
l_recipe_rout_step (1).process_qty_uom
FROM gmd_operations_b
WHERE oprn_id = p_gme_batch_step.oprn_id;
/* SELECT process_qty_um
INTO l_recipe_rout_step (1).process_qty_uom
FROM gmd_operations
WHERE oprn_id = p_gme_batch_step.oprn_id;*/
IF NOT (gme_batch_steps_dbl.update_row (p_batch_step => x_gme_batch_step) ) THEN
RAISE batch_step_update_error;
gme_common_pvt.log_message ('GME_INSERT_BATCH_STEP_SUCCESS');
gme_debug.put_line ('End Insert_Batch_Step');
gme_debug.put_line ('insert_step --> invalid batch status');
gme_common_pvt.log_message ('GME_INV_STATUS_INSERT_STEP');
gme_debug.put_line ('insert_step --> no oprn passed');
gme_debug.put_line ('insert_step --> step qty < zero');
gme_debug.put_line ('insert_step --> no ORGANIZATION_ID supplied');
WHEN batch_step_fetch_error OR batch_step_update_error THEN
IF (NVL (g_debug, -1) = gme_debug.g_log_statement) THEN
gme_debug.put_line
(fnd_msg_pub.get (p_encoded => fnd_api.g_false) );
gme_debug.put_line ( 'GME insert_step API -- when others '
|| SQLERRM);
fnd_msg_pub.add_exc_msg ('GME_API_INSERT_STEP', 'INSERT_BATCH_STEP');
END insert_batch_step;
SELECT max_capacity, capacity_um --Bug#5231180 changed to capacity um
FROM cr_rsrc_mst
WHERE resources = p_rsrc
AND delete_mark = 0
AND capacity_constraint = 1;
SELECT std_factor, um_type
FROM sy_uoms_mst
WHERE um_code = v_um_code; */
SELECT conversion_rate, uom_class
FROM mtl_uom_conversions
WHERE uom_code = v_um_code
AND inventory_item_id = 0;
gme_debug.put_line ('Insert_batch_step... BEGIN calc max cap');
gme_debug.put_line('GME insert_step API calc_max_cap --> resources in diff UOM types...');
gme_debug.put_line ('Insert_batch_step... END calc max cap');
( 'GME insert_step API calc_max_cap --> when others '
|| SQLERRM);