Aid To Understanding Why Debit Notes Are Not Generated by Receiving Returns
Last updated on JUNE 01, 2016
Applies to:Oracle Inventory Management - Version 11.5.10.CU2 to 12.1.3 [Release 11.5.10 to 12.1]
Information in this document applies to any platform.
The aim of this document is to assist in understanding why a Debit Memo is not automatically generated when a Return To Supplier is performed in the Receiving module.
When a Return To Supplier is entered on the Receiving Return form (RCVTXERE), the Receiving Transaction Processor (RTP) is called.
The RTP is constructed of libraries, one of which is rvtuq.lpc.
The library contains the function rvtuqdebitmemo which then calls the AP API AP_AUTO_DM_CREATION_PKG
It is this API that is responsible for generating the Debit Memo.
There are seven conditions that must be meet for a Debit Memo to be generated:
1. The supplier site has to be marked to allow RTS transactions.
2. There must be an original invoice already in AP for the item being returned.
3. The PO and the original Invoice must be to the same Supplier Site.
4. The Supplier Site must be marked as BOTH a Pay Site and a Purchasing Site.
5. The return quantity cannot cause the quantity invoiced to go negative and the return quantity must be equal to or less than the quantity invoiced.
6. The Create Debit Memo check-box must also be turned on in the Receipt form.
7. The return must be to the Supplier, and not to Receiving.
To assist in checking some of these conditions, the following SQL may be used which will prompt for the Purchase Order number in question:
,POR.RELEASE_NUM "Rel Num"
,poh.pay_on_code "PO.Paid Upon"
,pvs.vendor_site_code "PVS.Vend Site"
,pvs.pay_on_code "PVS.Paid Upon"
,pvs.pay_on_receipt_summary_code "PVS.Invoice Summary @"
,pvs.create_debit_memo_flag "PVS.Create Debit"
,pvs.pay_site_flag "PVS.Is a Pay Site"
,pvs.purchasing_site_flag "PVS.Is a Purchasing Site"
,rcv.invoice_status_code "RT.Invoice Status"
,ai.Invoice_Num "AP.Invoice Num"
,aid.Distribution_Line_Number "AP.Dist Num"
from PO_HEADERS_ALL POH
--and POR.RELEASE_NUM='&rel_num' -- Uncomment for specific Po Release Number
and pod.po_header_id = poh.po_header_id
and RCV.PO_HEADER_ID = POH.PO_HEADER_ID
and RCV.PO_RELEASE_ID = POR.PO_RELEASE_ID (+)
and nvl(rcv.Po_Distribution_Id,pod.po_distribution_id) = pod.po_distribution_id
and rcv.transaction_type ='RECEIVE'
and rsh.shipment_header_id = rcv.shipment_header_id
and pod.po_distribution_id = aid.po_distribution_id (+)
and ai.Invoice_Id (+) = aid.Invoice_Id
and poh.vendor_id = pv.vendor_id
and POH.VENDOR_SITE_ID = PVS.VENDOR_SITE_ID
order by pod.Po_Distribution_Id,ai.Invoice_Num, aid.line_type_lookup_code, aid.Invoice_Distribution_Id ;
The SQL will return values for three of the seven conditions:
1. The supplier site has to be marked to allow RTS transactions (PVS.Create Debit)
2. There must be an original invoice already in AP for the item being returned. (AP.Invoice Num)
4. The Supplier Site must be marked as BOTH a Pay Site and a Purchasing Site (PVS.Is a Pay Site & PVS.Is a Purchasing Site)
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
Million Knowledge Articles and hundreds of Community platforms