The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT *
FROM gme_batch_steps
WHERE batch_id = v_batch_id;
SELECT *
FROM gme_material_details
WHERE batch_id = v_batch_id
FOR UPDATE OF actual_qty NOWAIT;
error_update_row EXCEPTION;
IF NOT gme_batch_header_dbl.update_row
(p_batch_header => x_batch_header_rec) THEN
RAISE error_update_row;
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_inventory_ind => x_batch_header_rec.update_inventory_ind
,p_create_resv_pend_lots => p_create_resv_pend_lots
,p_from_batch => TRUE
,x_return_status => x_return_status);
,p_update_inventory_ind => x_batch_header_rec.update_inventory_ind
,p_create_resv_pend_lots => NULL
,p_from_unrelease_batch => 1
,x_batch_step_rec => l_batch_step_rec
,x_return_status => x_return_status);
GMF_VIB.Delete_Batch_Requirements
( p_api_version => 1.0,
p_init_msg_list => FND_API.G_FALSE,
p_batch_id => x_batch_header_rec.batch_id,
x_return_status => x_return_status,
x_msg_count => l_message_count,
x_msg_data => l_message_list);
WHEN error_update_row THEN
gme_common_pvt.log_message ('GME_UNEXPECTED_ERROR', 'ERROR'
,SQLERRM);
,p_update_inventory_ind IN VARCHAR2
,p_create_resv_pend_lots IN NUMBER
,p_from_batch IN BOOLEAN
,x_return_status OUT NOCOPY VARCHAR2)
IS
l_api_name CONSTANT VARCHAR2 (30) := 'unrelease_material';
error_update_row EXCEPTION;
IF p_update_inventory_ind = 'Y'
AND l_item_rec.mtl_transactions_enabled_flag = 'Y'
AND l_material_detail_rec.actual_qty <> 0 THEN
-- delete all transactions for this material
revert_material_full
(p_material_detail_rec => l_material_detail_rec
,p_create_resv_pend_lots => p_create_resv_pend_lots
,p_ignore_transactable => FALSE
,x_actual_qty => l_actual_qty
,x_exception_material_tbl => l_exception_material_tbl
,x_return_status => x_return_status);
END IF; -- IF x_batch_header_rec.update_inventory_ind = 'Y' AND
IF NOT gme_material_details_dbl.update_row (l_material_detail_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 i.lot_control_code, i.concatenated_segments, i.inventory_item_id, i.reservable_type
FROM mtl_system_items_kfv i
WHERE i.organization_id = v_organization_id
AND i.inventory_item_id = v_inventory_item_id;
' calling gme_transactions_pvt.delete_material_txn with trxn_id= '||l_mmt_rec.transaction_id);
gme_transactions_pvt.delete_material_txn
(p_transaction_id => l_mmt_rec.transaction_id
,p_txns_pair => NULL
,x_return_status => x_return_status);
|| ' gme_transactions_pvt.delete_material_txn returned '||l_return_status
|| ' but p_ignore_transactable is set to TRUE; so moving to the next transaction');
|| ' gme_transactions_pvt.delete_material_txn returned '||l_return_status
|| ' but p_ignore_transactable is set to FALSE; raising exception');
ELSE -- delete was successful; recreate resv / pplot if requested
gme_debug.put_line(g_pkg_name|| '.'|| l_api_name || ' delete loop; actual_qty = '||x_actual_qty);
gme_debug.put_line(g_pkg_name|| '.'|| l_api_name || ' delete loop; trans qty fromm mmt = '||l_mmt_rec.transaction_quantity);
gme_debug.put_line(g_pkg_name|| '.'|| l_api_name || 'after trxn delete loop; actual_qty = '||x_actual_qty);
SELECT *
FROM mtl_material_transactions mmt
WHERE transaction_id = v_transaction_id;
SELECT count(1)
FROM gme_batch_steps
WHERE step_status NOT IN (gme_common_pvt.g_step_pending, gme_common_pvt.g_step_wip)
AND batch_id = v_batch_id;