ROI Errors RCV_TRX_QTY_EXCEEDS_AVAILABLE For Return 'qty from GET_AVAILABLE_QUANTITY for return is 0' (Doc ID 1401286.1)

Last updated on JUNE 01, 2016

Applies to:

Oracle Inventory Management - Version: 11.5.10.2 to 12.1.3 - Release: 11.5.10 to 12.1
Information in this document applies to any platform.
Executable:RVCTP - Receiving Transaction Processor

Symptoms

When attempting to process a return via Receiving Open Interface
the following error occurs

The Quantity entered for receipt is greater than the available Quantity. The sum of quantity to be received and already received, 1, is greater than the sum of ordered quantity and over receipt tolerance, 0.

 
Steps

1. Record in RCV_TRANSACTIONS_INTERFACE table has

Interface_Transaction_Id 1405019
Transaction_Type RETURN TO VENDOR
Processing_Mode_Code BATCH
Transaction_Status_Code PENDING
Quantity 1
Uom_Code EA
Shipment_Header_Id 687934
Shipment_Line_Id 657218
Receipt_Source_Code VENDOR
Parent_Transaction_Id 693065
Po_Header_Id 32583
Po_Line_Id 72591
Po_Line_Location_Id 72720
Po_Distribution_Id 71347

2. Run RVCTP

3. It completes in error
In PO_INTERFACE_ERRORS see records including
Interface_Type RCV-856
Error_Message The Quantity entered for receipt is greater than the available Quantity. The sum of quantity to be received and already received, 1, is greater than the sum of ordered quantity and over receipt tolerance, 0.
Error_Message_Name RCV_TRX_QTY_EXCEEDS_AVAILABLE
Table_Name RCV_TRANSACTIONS_INTERFACE
Batch_Id 42839
Interface_Line_Id 1405019

4. When setting debug profile options per Note 299497.1 RVCTP log file shows the following

[23-JAN-12 14:18:34] RCV_ROI_RETURN 598: 1. transaction_type: RETURN TO VENDOR
[23-JAN-12 14:18:34] RCV_ROI_RETURN 599: 2. parent id: 693065
[23-JAN-12 14:18:34] RCV_ROI_RETURN 600: 3. receipt source code: VENDOR
[23-JAN-12 14:18:34] RCV_ROI_RETURN 601: 4. parent transaction_type: DELIVER
[23-JAN-12 14:18:34] RCV_ROI_RETURN 602: 5. grand parent id: NULL
[23-JAN-12 14:18:34] RCV_ROI_RETURN 603: 6. correction type: NEGATIVE
[23-JAN-12 14:18:34] RCV_ROI_RETURN 604: 7. available quantity: 0
[23-JAN-12 14:18:34] RCV_ROI_RETURN 605: 8. tolerable_quantity: 0
[23-JAN-12 14:18:34] RCV_ROI_RETURN 606: 9. unit of measure: Each
[23-JAN-12 14:18:34] RCV_ROI_RETURN 607: 10. 2nd available quantity : 0
[23-JAN-12 14:18:34] RCV_QUANTITIES_S begin: v--------Procedure Started-----------v
[23-JAN-12 14:18:34] RCV_QUANTITIES_S 1668: in get_correction_quantity
[23-JAN-12 14:18:34] RCV_QUANTITIES_S 1707: Before get_deliver_quantity
[23-JAN-12 14:18:34] RCV_QUANTITIES_S end_i: ^--------Implicit Procedure Exit-----^
[23-JAN-12 14:18:34] RCV_ROI_RETURN 624: qty from GET_AVAILABLE_QUANTITY for return is 0
[23-JAN-12 14:18:34] RCV_ROI_RETURN 658: Converted trx qty that is available 0
[23-JAN-12 14:18:34] RCV_ROI_RETURN 659: Remaining qty in parents uom that is available 1
[23-JAN-12 14:18:34] RCV_ROI_RETURN 705: <= 0 Quantity but more records in cursor
[23-JAN-12 14:18:34] RCV_ROI_RETURN 711: We have to deal with remaining_qty > 0 and x_converted_trx_qty -ve
[23-JAN-12 14:18:34] RCV_ROI_RETURN 720: Transaction qty in terms of the parents uom is 0
[23-JAN-12 14:18:34] RCV_ROI_RETURN 509: Backup Qty 1
[23-JAN-12 14:18:34] RCV_ROI_RETURN 510: Remaining Quantity 1
[23-JAN-12 14:18:34] RCV_ROI_RETURN 517: DEBUG: transaction_type = RETURN TO VENDOR
[23-JAN-12 14:18:34] RCV_ROI_RETURN 521: fetch derive_return
[23-JAN-12 14:18:34] RCV_ROI_RETURN 786: Out of the loop
[23-JAN-12 14:18:34] RCV_ROI_RETURN 798: Temp table pointer 1
[23-JAN-12 14:18:34] RCV_ROI_RETURN 799: Check which condition has occured
[23-JAN-12 14:18:34] RCV_ERROR_PKG begin: v--------Procedure Started-----------v
[23-JAN-12 14:18:34] RCV_ERROR_PKG 180: set error message token = RCV_TRX_QTY_EXCEEDS_AVAILABLE 


The trace shows one of the last instruction is

******************************************************************************** 
SELECT NVL(SUM(DECODE(TRANSACTION_TYPE, 'CORRECT', -1 *
(DECODE(NVL(ORDER_TRANSACTION_ID,-999),-999,PRIMARY_QUANTITY,
NVL(INTERFACE_TRANSACTION_QTY,0))), DECODE(NVL(ORDER_TRANSACTION_ID,-999),
-999,PRIMARY_QUANTITY,NVL(INTERFACE_TRANSACTION_QTY,0)) )),0),
MIN(PRIMARY_UNIT_OF_MEASURE) FROM
RCV_TRANSACTIONS_INTERFACE WHERE (TRANSACTION_STATUS_CODE = 'PENDING' AND PROCESSING_STATUS_CODE <> 'ERROR') AND PARENT_TRANSACTION_ID = :B1
********************************************************************************


What has been checked
. There is available quantity to be returned:
In po_line_locations_table the quantity_received is 1, Receiving_Routing_Id 3 direct delivery,
In po_distributions_all quantity_delivered is 1.
. In rcv_transactions table Receive and Deliver transactions have not been corrected
. Parent_Transaction_Id 693065 is the id of the DELIVER transaction as the routing is direct delivery
. There are no other records stuck in RTI with Parent_Transaction_Id = 693065
. Rollup Patch 23 has been applied to so have latest version of RCV_ROI_RETURN package RCVPRERB.pls

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms