The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT *
FROM gme_material_details
WHERE batch_id = v_batch_id
AND line_type = gme_common_pvt.g_line_type_ing;
SELECT s.*
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;
error_update_batch EXCEPTION;
error_update_row 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);
IF p_batch_header_rec.update_inventory_ind = 'Y' AND
l_item_rec.mtl_transactions_enabled_flag = 'Y' THEN
IF g_debug <= gme_debug.g_log_procedure THEN
gme_debug.put_line(g_pkg_name||'.'||l_api_name||' processing phantom product material_detail_id='||l_matl_dtl_rec.material_detail_id);
UPDATE gme_material_details
SET actual_qty = l_matl_dtl_rec.actual_qty,
wip_plan_qty = l_matl_dtl_rec.wip_plan_qty,
last_updated_by = gme_common_pvt.g_user_ident,
last_update_date = gme_common_pvt.g_timestamp,
last_update_login = gme_common_pvt.g_login_id
WHERE material_detail_id = l_matl_dtl_rec.material_detail_id;
UPDATE gme_material_details
SET actual_qty = l_matl_dtl_rec.actual_qty,
wip_plan_qty = l_matl_dtl_rec.wip_plan_qty,
last_updated_by = gme_common_pvt.g_user_ident,
last_update_date = gme_common_pvt.g_timestamp,
last_update_login = gme_common_pvt.g_login_id
WHERE material_detail_id = l_matl_dtl_rec.phantom_line_id;
UPDATE gme_material_details
SET wip_plan_qty = plan_qty
WHERE batch_id = p_batch_header_rec.batch_id
AND wip_plan_qty is NULL;
WHEN error_update_batch OR error_update_row OR error_fetch_material THEN
/* Bug 5554841 No need to set messsage it is set by called APIs */
--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_ingredient';
l_update_matl BOOLEAN;
error_update_row EXCEPTION;
l_update_matl := FALSE;
IF p_update_inv_ind = 'Y' AND
l_item_rec.mtl_transactions_enabled_flag = 'Y' THEN
--Pawan Kumar bug 4742244 --
-- check for item which dispensable but non-reservable
IF ( NVL(G_DEBUG,-1) = GME_DEBUG.G_LOG_STATEMENT ) THEN
gme_debug.put_line(g_pkg_name||'.'||l_api_name||'disp ind'||l_matl_dtl_rec.dispense_ind);
l_update_matl := TRUE;
l_update_matl := TRUE;
IF l_update_matl THEN
-- set WIP plan qty
l_matl_dtl_rec.wip_plan_qty := l_matl_dtl_rec.plan_qty;
gme_debug.put_line(g_pkg_name||'.'||l_api_name||' before update_row; actual_qty='||l_matl_dtl_rec.actual_qty);
gme_debug.put_line(g_pkg_name||'.'||l_api_name||' before update_row; wip_plan_qty='||l_matl_dtl_rec.wip_plan_qty);
IF NOT gme_material_details_dbl.update_row (l_matl_dtl_rec) THEN
RAISE error_update_row;
WHEN error_update_row OR error_fetch_batch 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
FROM mtl_system_items_kfv
WHERE inventory_item_id = v_inventory_item_id
AND organization_id = v_org_id;
error_insert_exceptions EXCEPTION;
IF NOT gme_common_pvt.insert_exceptions(p_exception_rec => l_exceptions_rec) THEN
RAISE error_insert_exceptions;
WHEN error_insert_exceptions THEN
x_return_status := FND_API.G_RET_STS_ERROR;
SELECT *
FROM gme_material_details
WHERE batch_id = v_batch_id
AND line_type = gme_common_pvt.g_line_type_ing
AND phantom_type <> 0;
SELECT s.batchstep_id
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 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;