The following lines contain the word 'select', 'insert', 'update' or 'delete':
, p_allow_delete IN VARCHAR2 DEFAULT NULL
, x_detail_rec_count OUT NOCOPY NUMBER
, x_return_status OUT NOCOPY VARCHAR2
, x_msg_count OUT NOCOPY NUMBER
, x_msg_data OUT NOCOPY VARCHAR2
) IS
/* Define local variables */
l_api_version CONSTANT NUMBER := 1.0;
SELECT reservable_type
FROM mtl_system_items
WHERE inventory_item_id = item_id
AND organization_id = org_id;
SELECT reservable_type
FROM mtl_secondary_inventories
WHERE organization_id = org_id
AND secondary_inventory_name = subinv_code;
SELECT t.transaction_source_type_id
FROM mtl_transaction_types t, mtl_txn_source_types st
WHERE t.transaction_source_type_id = st.transaction_source_type_id
AND t.transaction_type_id = txn_type_id;
SELECT delivery_detail_id
, requested_quantity
, requested_quantity2
, source_line_id
FROM wsh_delivery_details
WHERE move_order_line_id = p_mo_line_rec.line_id
AND released_status = 'S';
SELECT nvl(sum(abs(trans_qty)), 0), nvl(sum(abs(trans_qty2)),0)
FROM ic_tran_pnd
WHERE line_id = source_line_id
AND line_detail_id = delivery_detail_id
AND delete_mark = 0 ;
SELECT trans_id, line_id
FROM ic_tran_pnd
WHERE line_id = p_mo_line_rec.txn_source_line_id
AND line_detail_id IN (
SELECT delivery_detail_id
FROM wsh_delivery_details
WHERE move_order_line_id = p_mo_line_rec.line_id
AND source_line_id = p_mo_line_rec.txn_source_line_id
AND released_status IN ('R', 'S'))
AND doc_type = 'OMSO'
AND delete_mark = 0
AND staged_ind = 0
AND completed_ind = 0
AND (lot_id >0 OR location <> 'l_IC$DEFAULT_LOCT');
l_p_allow_delete VARCHAR2(3);
l_p_allow_delete := p_allow_delete;
GMI_Reservation_Util.PrintLn('l_p_allow_delete = ' || l_p_allow_delete);
IF (UPPER(l_p_allow_delete) = 'YES')
OR (l_p_allow_delete IS NULL AND UPPER(l_GML$DEL_ALC_BEFORE_AUTO) = 'YES')
THEN
OPEN c_get_trans_id;
GMI_TRANS_ENGINE_PUB.delete_pending_transaction
( 1
, FND_API.G_FALSE
, FND_API.G_FALSE
, FND_API.G_VALID_LEVEL_FULL
, l_tran_rec
, l_tran_row
, x_return_status
, x_msg_count
, x_msg_data
);
GMI_Reservation_Util.PrintLn('return from DELETE PENDING TRANS x_return_status = ' || x_return_status);
GMI_RESERVATION_UTIL.PrintLn('Error returned by Delete_Pending_Transaction');
/* Once the Reallocation done, need to update the MO_Line with the new detailed_qty */
/* ============================================================================ */
/* Update the detailed quantity (and if possible, the sourcing information) */
/* of the Move Order Line */
/* If the move order line is not fully detailed, update the */
/* return status as appropriate. */
GMI_Reservation_Util.PrintLn('ictrans count='||GMI_Reservation_Util.ic_tran_rec_tbl.COUNT);
gmi_reservation_util.println('Value of p_grouping_rule_id in Process Line before update_row is '||p_grouping_rule_id);
GMI_Reservation_Util.PrintLn('calling GMI_Move_Order_line_UTIL.Update_Row');
GMI_Move_Order_Line_UTIL.Update_Row(l_mo_line_rec);