The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT *
FROM gme_material_details
WHERE batch_id = v_batch_id
FOR UPDATE OF actual_qty NOWAIT;
SELECT *
FROM gme_material_details
WHERE batch_id = v_batch_id
AND ((line_type = -1 AND phantom_id IS NOT NULL) OR
(line_type <> -1 AND phantom_line_id IS NULL ))
ORDER BY line_no ;
BATCH_HIST_INSERT_ERR EXCEPTION;
BATCH_HDR_UPDATE_ERROR EXCEPTION;
IF l_batch_header_rec.update_inventory_ind = 'Y'
THEN
IF NOT gme_common_pvt.create_history (l_batch_header_rec, p_batch_header_rec.batch_status,
gme_common_pvt.g_transaction_header_id)
THEN
RAISE batch_hist_insert_err;
/* Update the batch header row to the database */
IF NOT GME_BATCH_HEADER_DBL.update_row(l_batch_header_rec) THEN
RAISE BATCH_HDR_UPDATE_ERROR;
/* Update the row who columns */
x_batch_header_rec.last_update_date := gme_common_pvt.g_timestamp;
x_batch_header_rec.last_updated_by := gme_common_pvt.g_user_ident;
x_batch_header_rec.last_update_login := gme_common_pvt.g_login_id;
WHEN BATCH_HIST_INSERT_ERR THEN
x_return_status := FND_API.G_RET_STS_ERROR;
WHEN BATCH_HDR_UPDATE_ERROR THEN
x_return_status := FND_API.G_RET_STS_ERROR;
SELECT batchstep_id
FROM gme_batch_step_items
WHERE material_detail_id = V_material_detail_id;
UPDATE_STEP_QTY_ERROR EXCEPTION;
SELECT mtl_transactions_enabled_flag
FROM mtl_system_items_b
WHERE organization_id = V_org_id
AND inventory_item_id = V_inventory_item_id;
IF l_batch_header_rec.update_inventory_ind = 'Y' THEN
IF (g_debug <= gme_debug.g_log_statement) THEN
gme_debug.put_line (g_pkg_name || '.' || l_api_name || ':'
|| 'calling revert mat:'||p_material_details_rec.material_detail_id);
/* Update the material detail row to the database */
IF NOT GME_MATERIAL_DETAILS_DBL.update_row (l_material_details_rec) THEN
RAISE ERROR_UPD_MATERIAL_DETAIL;
/* Invoke the update step qty API to update the step quantities and the */
/* quantities of the succeeding steps */
GME_TRANS_ENGINE_UTIL.load_rsrc_trans (l_batch_header_rec
,l_rsrc_trans_count
,l_return_status);
GME_UPDATE_STEP_QTY_pvt.update_step_qty (P_batch_step_rec => l_in_batch_step_rec
,x_message_count => l_message_count
,x_message_list => l_message_list
,x_return_status => l_return_status
,x_batch_step_rec => l_batch_step_rec);
RAISE UPDATE_STEP_QTY_ERROR;
END IF; /* hupdate_inventory_ind*/
WHEN ERROR_LOAD_TRANS OR UPDATE_STEP_QTY_ERROR THEN
x_return_status := l_return_status;