The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT step_status
FROM gme_batch_steps s, gme_batch_step_items item
WHERE s.batchstep_id = item.batchstep_id
AND item.material_detail_id = v_matl_dtl_id;
SELECT *
FROM gme_batch_steps
WHERE batch_id = v_batch_id
AND step_status NOT IN (gme_common_pvt.g_step_completed, gme_common_pvt.g_step_closed);
SELECT hdr.*
FROM gme_material_details dtl, gme_batch_header hdr
WHERE dtl.batch_id = v_batch_id
AND dtl.line_type = gme_common_pvt.g_line_type_ing
AND dtl.phantom_id IS NOT NULL
AND hdr.batch_id = dtl.phantom_id
AND hdr.batch_status NOT IN (gme_common_pvt.g_batch_completed, gme_common_pvt.g_batch_closed);
SELECT *
FROM gme_material_details
WHERE batch_id = v_batch_id
AND (line_type = gme_common_pvt.g_line_type_ing OR
(line_type = gme_common_pvt.g_line_type_prod AND phantom_line_id IS NOT NULL))
FOR UPDATE OF actual_qty NOWAIT;
SELECT *
FROM gme_material_details
WHERE batch_id = v_batch_id
AND line_type IN (gme_common_pvt.g_line_type_prod,gme_common_pvt.g_line_type_byprod)
AND phantom_line_id IS NULL -- no phantom products
FOR UPDATE OF actual_qty NOWAIT;
error_update_batch EXCEPTION;
IF NOT gme_batch_header_dbl.update_row (p_batch_header => x_batch_header_rec) THEN
RAISE error_update_batch;
x_batch_header_rec.last_updated_by := gme_common_pvt.g_user_ident;
x_batch_header_rec.last_update_date := gme_common_pvt.g_timestamp;
x_batch_header_rec.last_update_login := gme_common_pvt.g_login_id;
,p_update_inv_ind => x_batch_header_rec.update_inventory_ind
,x_exception_material_tbl => x_exception_material_tbl
,x_return_status => l_return_status);
-- This will insert exception all completed step products and byprodcuts.
--Bug#5296812 Added the call to the item record.Added the condition to check the inv update ind,and transaction ind.Start
gme_material_detail_pvt.get_item_rec
(p_org_id => l_matl_dtl_rec.organization_id
,p_item_id => l_matl_dtl_rec.inventory_item_id
,x_item_rec => l_item_rec
,x_return_status => l_return_status);
IF p_batch_header_rec.update_inventory_ind = 'Y' AND l_item_rec.mtl_transactions_enabled_flag = 'Y' THEN
--Bug#5296812 End.
IF l_step_status = gme_common_pvt.g_step_completed THEN
l_exception_qty := l_matl_dtl_rec.wip_plan_qty - l_matl_dtl_rec.actual_qty;
END IF;--IF p_batch_header_rec.update_inventory_ind = 'Y'.....
IF p_batch_header_rec.update_inventory_ind = 'Y' AND
l_item_rec.mtl_transactions_enabled_flag = 'Y' THEN
--Bug#5296812 End.
l_exception_qty := l_matl_dtl_rec.wip_plan_qty - l_matl_dtl_rec.actual_qty;
END IF; --IF p_batch_header_rec.update_inventory_ind = 'Y'...
WHEN error_update_batch THEN
gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR', SQLERRM);
,p_update_inv_ind IN VARCHAR2
,x_exception_material_tbl IN OUT NOCOPY gme_common_pvt.exceptions_tab
,x_return_status OUT NOCOPY VARCHAR2) IS
l_api_name CONSTANT VARCHAR2 (30) := 'process_material';
error_update_row EXCEPTION;
IF p_update_inv_ind = 'Y' AND
l_item_rec.mtl_transactions_enabled_flag = 'Y' THEN
l_start_actual_qty := l_matl_dtl_rec.actual_qty;
IF p_update_inv_ind = 'Y' AND l_item_rec.mtl_transactions_enabled_flag = 'Y' THEN
--Bug#5296812 End.
l_exception_qty := l_matl_dtl_rec.wip_plan_qty - l_matl_dtl_rec.actual_qty;
END IF;--IF p_update_inv_ind = 'Y' AND...
IF NOT gme_material_details_dbl.update_row (l_matl_dtl_rec) THEN
RAISE error_update_row;
WHEN error_fetch_batch OR error_update_row THEN
gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR', SQLERRM);
SELECT revision
FROM mtl_item_revisions_b
WHERE inventory_item_id = v_item_id
AND organization_id = v_org_id
AND effectivity_date <= gme_common_pvt.g_timestamp
ORDER BY effectivity_date desc;
SELECT concatenated_segments, primary_uom_code
FROM mtl_system_items_kfv
WHERE inventory_item_id = v_inventory_item_id
AND organization_id = v_org_id;
SELECT count(1)
FROM gme_batch_steps
WHERE step_status NOT IN (gme_common_pvt.g_step_completed, gme_common_pvt.g_step_closed)
AND batch_id = v_batch_id
AND rownum = 1;
SELECT *
FROM gmd_recipe_validity_rules
WHERE recipe_validity_rule_id = v_recipe_validity_rule_id;
SELECT status_type
FROM gmd_status
WHERE status_code=v_validity_rule_status;