Query of 3 Way match ( Invoice-Receipt)
Hi All,
Can Someone please give me Matching Invoice Query (AP) / Steps for 3-way matching. I have requirement wherein I have to match Invoice with Receipt but I don't know how should i do that through coding or required steps.
As I know I know below conditions are required for 3 way match but dont know how should I get all these individual data from AP tables.
Invoice price <= Purchase order price
Quantity billed <= Quantity Ordered
Quantity billed <= Quantity received
Can you please help me to get this information.
Thanks.
I have prepared queries based on d 3-way match functionality .. Can some one please verify this, if I am missing anything here -
-- Invoice price <= Purchase order price
SELECT sum((NVL(poll.quantity, 0) - NVL(poll.quantity_cancelled, 0)) *
NVL(pol.unit_price, 0)) "PO PRICE",
sum(apd.quantity_invoiced * apd.unit_price) "INVOICE PRICE"
FROM po_headers_all poh,
po_lines_all pol,
po_line_locations_all poll,
po_distributions_all pd,
ap_invoice_distributions_all apd
WHERE poh.po_header_id = pol.po_header_id AND
pol.po_line_id = poll.po_line_id AND
poll.po_header_id = pol.po_header_id AND
poh.authorization_status = 'APPROVED' AND
poh.type_lookup_code = 'STANDARD' AND
NVL(poh.cancel_flag, 'N') = 'N' AND POL.ITEM_ID IS NOT NULL AND
apd.unit_price < pol.unit_price AND
-- AND NVL (poll.quantity, 0) > (NVL (poll.Quantity_received,0) + NVL (poll.Quantity_cancelled,0))
poll.inspection_required_flag = 'N' AND
poll.receipt_required_flag = 'Y' and
pd.po_header_id = poh.po_header_id(+) AND
poll.po_header_id = pd.po_header_id AND
pd.po_line_id = pol.po_line_id AND
pd.line_location_id = poll.line_location_id AND
apd.po_distribution_id = pd.po_distribution_id AND
POH.po_header_id = ? AND apd.po_distribution_id is not null
-- Quantity billed <= Quantity Ordered
SELECT sum(pd.quantity_ordered) "Quantity Ordered",
sum(pd.quantity_billed) "Quantity Billed"
--sum(apd.quantity_invoiced) "Quantity billed"
FROM po_headers_all poh,
po_lines_all pol,
po_line_locations_all poll,
po_distributions_all pd,
ap_invoice_distributions_all apd
WHERE poh.po_header_id = pol.po_header_id AND
pol.po_line_id = poll.po_line_id AND
poll.po_header_id = pol.po_header_id AND
poh.authorization_status = 'APPROVED' AND
poh.type_lookup_code = 'STANDARD' AND
NVL(poh.cancel_flag, 'N') = 'N' AND POL.ITEM_ID IS NOT NULL AND
apd.unit_price < pol.unit_price
-- AND NVL (poll.quantity, 0) > (NVL (poll.Quantity_received,0) + NVL (poll.Quantity_cancelled,0))
and POH.po_header_id = ? and poll.inspection_required_flag = 'N' AND
poll.receipt_required_flag = 'Y' and
pd.po_header_id = poh.po_header_id(+) AND
poll.po_header_id = pd.po_header_id AND
pd.po_line_id = pol.po_line_id AND
pd.line_location_id = poll.line_location_id and
apd.po_distribution_id = pd.po_distribution_id and
apd.po_distribution_id is not null
--Quantity billed <= Quantity received
SELECT sum(rsl.QUANTITY_RECEIVED) "Quantity received"
from rcv_transactions rct,
rcv_shipment_headers rsh,
rcv_shipment_lines rsl,
po_lines pol,
po_line_locations pll
where rct.po_line_location_id = pll.line_location_id and
rct.po_line_id = pol.po_line_id and
nvl(pol.order_type_lookup_code, 'QUANTITY') NOT IN
('RATE', 'FIXED PRICE') and
rct.shipment_line_id = rsl.shipment_line_id and
rsl.shipment_header_id = rsh.shipment_header_id and
transaction_type = 'RECEIVE' and pol.po_header_id = ?
order by rct.transaction_id
Similar Messages
-
Is it mandatory to perform PO receiving for a 2 way matching Invoices in 12.0.6?
Requirement :
Supplier would send everyday some files with respect to the quantity delivered..This delivery would be ad hc and without against any PO#...Invoicing needs to go via a PO.
Solution porposed :
a) Create a Inventory Org for that specific vendor
b) Create Misc receipts for the items sent based on the file received
c) Create a 2 way match PO
b) Create an Invoice and pay the vendor.
Let me know if you see any loopholes with this solution.
Thanks in advance!2 way matching in any version is between Qty Ord and Qty Billd.
-
Two Way or Three way matching invoice
Hi Gurus,
Can you please tell me what does two way, three way invoice matching mean???
What is the use and impact of two way or three way invoce matching concept??
Thank YouTwo way matching is
Invoice quantities and values for a supplier matched against the original purchase order quantity and values for the same supplier
Usually used for consumable purchasing
Three way matching is
Invoice quantities and values for a supplier matched against the original purchase order quantity and values for the supplier against a goods receipt posting made by your company
Usually used for stock purchasing -
could someone give examples for 3 way match and ERS
Hello ,
2-Way Match
1.PO & invoice should match
2.Quantity Billed <= Quantity Ordered
3.No Receipt required
3-way Match
1.Receipt, PO & invoice should match
2.Quantity Billed <= Quantity Received
3.Receipt required
If the invoice is matched to the goods receipt ,the price is matched to the purchase order and the variance is within predefined tolerances, then the invoice is cleared for payment. If the invoice exceeds the predefined tolerances, the invoice will be posted and blocked for payment.
ERS
ERS allows settlement of a goods receipt without receiving the actual invoice from the Vendor. The system can generate the corresponding invoices and post them. A vendor invoice is no longer required
Regards,
Shailesh Mackwan -
Hi,
Please help to set up PO with 2-way match invoice processing. We currently follow PO with 3-way match process. So we need to propose for 2-way with PO which will reduce the turn around time of invoices.
Thanks & Regards,
Rajaneesh.C2 Way Match - PO and Invoice
3 Way Match - PO, Receipt and Invoice
When you want to do a 2 Way Match Invoice, it means create a PO and Invoice it.
Settings in PO:
UnSet the GR Based-IV in the Invoice tab. Then both the below options are possible.
PO --> GR _-> Invoice
PO --> Invoice _-> GR
When you are doing the GR, you are affecting only the GR/IR account and the Stock account.
When you are doing the Invoice, you are affecting the GR/IR account and the Vendor account.
So Once you are done with the MIRO before creating the GR, you can pay the Vendor.
Later when you receive it, it will balance the GR/IR and Stock Account.
When you want to do a 3 Way Match Invoice, it means create a PO, Receive and Invoice it.
Settings in PO:
Set the GR Based-IV in the Invoice tab. Then the below option only possible.
PO --> GR _-> Invoice
When you are doing the GR, you are affecting only the GR/IR account and the Stock account.
When you are doing the Invoice, you are affecting the GR/IR account and the Vendor account.
So Once you are done with the receipt, you can create the invoice and that will balance the GR/IR account. Then you can pay the Vendor.
Hope it makes it clear now.
Note: You can update the Info Record to set or unset the GR Based IV Indicator to populate in PO. -
2 Way Match - PO and Invoice (no goods receipt)
Dear Gurus,
We need to Implement the 2 Way Match process between the Invoice and the PO i.e. perform the Match once invoice has been recorded. The condition is invoice value should be less than $500. This means supplier will be paid irrespective of a goods receipt for a PO line. The goods receipt can happen later to close a PO line.
Please see below examples which will fall under this criteria.
PO # A
Line # 1 - Qty = 10 - PO unit Price = 100 - PO Total = 1000
Inv Qty = 4 - Inv line Total = 400 - Inv Grand total = 400
PO # B
Line # 1 - Qty = 5 - PO unit Price = 80 - PO Total = 400
Inv Qty = 5 - Inv line Total = 400 - Inv Grand total = 400
PO # 3
Line # 1 - Qty = 5 - PO unit Price = 100 - PO Total = 500
Line # 2 - Qty = 10 - PO unit Price = 10 - PO Total = 1000
PO total = 1500
Invoice Line # 1 - Inv Qty = 5 - Inv line Total = 400 - Inv Grand total = 400
Can these be achived by some setups?
Is there a way by which we can achieve this?
Thanks for your response in advance.Hi Venkat,
Thanks for the swift response.
In fact we will be doing GR but at a later date. The object is to not held the vendor invoice and payment (esp. for small amt) just bcoz goods reception not done. Understand your concern that GR/IR might cause an issue. -
3 way match of invoice in SAP for legacy PO
My client is using legacy system for purchasing direct materials. SAP FI has been implemented. Customer like to carryout indirect purchasing (consumables - text purchase & MRO items) directly in SAP and hence we are configuring minimum org structure. When we suggested about 3 way match of invoices to customer for indirect purchases, customer expressed interest to carryout 3 way match for direct purchases as well in SAP. Please note that direct materials are procured in legacy system.
Customer query : Is it possible to carry out 3 way matching of invoices in SAP without material master & inventory management for direct purchases happening in legacy system. If so, please explain the solution and its pros and cons. Please share your experiences and lessons learned on similar requirement.. Also suggest alternate solutions..... Thanks for your time and help.a three way match is matching quantity and price from purchase order, goods receipt and invoice receipt .
If all documents are done in SAP, then SAP will do this match when you enter the invoice
But if you procure in a external system and use only SAP-FI to post and pay invoices, then you cannot have a automatic 3way match. In that case the 3way match must be done manually by the accountant. -
3-Way Match with Multiple Invoices
This may be a basic Oracle iProcurement functionality question, but i have been unable to get a good answer. Any information will be greatly appreciated.
I am currently using Oracle 11i iProcurement.
The problem I am having is I am unable to perform a 3-way Match in the system on purchase orders that will use multiple invoices. Our vendors require a tiered payment structure (i.e. 50% due up front before shipment, 30% due when item has reached shipment destination, and 10% due after our engineers have inspected the shipment).
We have been currently using a 2-way match for all of our purchase orders because when we apply the first invoice against the PO (50%), the PO will automatically close before we can receipt the goods against the purchase order.
Our Invoice Receipt Close % Tolerance and Invoice Close % Tolerance are set at 0%.
Our goal is to receipt the first 50% against the purchase order, have the PO remain open, and receipt the goods in Oracle after the 2nd or 3rd invoice application against the PO.
Thanks in advance.
Edited by: user13053863 on Apr 28, 2010 2:44 PMHmm, an interesting situation. What are the quantities on your purchase orders? Are they almost always a quantity of 1? Payables should only close a purchase order when quantity billed and quantity received is GT or equal to the quantity ordered. So if you order a quantity of 10, you could match for quantity 5 on the first invoice, quantity 3 for the second invoice, and quantity 2 for the final invoice. But since you don't receive the quantity until the 3rd invoice, you cannot match on receipts, so that would be a problem.
Maybe you need to approach this from a different angle? Maybe you should look at the prepayments ability in Payables. Typically Prepayments will be charged to a Prepayment Account (asset). Say you have a purchase order for $10,000. You prepay $5,000 up front, so basically Debit Prepayment 5,000 and Credit Cash 5,000. Same for the next prepayment level - $3,000. Then you get the ordered material received. So you want to do an invoice for $10,000. Match the invoice to the purchase order. Apply the prepayments to the purchase order. Thus you get an entry something like Debit Inventory $10,000, Credit Prepayments $8,000, and Credit Cash $2,000.
From an accounting perspecitive, you don't show the prepayments in inventory until received, but do show a prepayment asset. Which is reflecting what you really are doing I think.
I have never worked for anyone who has had to do prepayments, but this is an area that you may wish to investigate as a possible solution for your situation. Good luck.
John Dickey -
Hello All,
Can one give me MATCHING Invoice Query (AP) for both 2-way and 3-way matching.
I would like to have a report which gives whther a particluar invoice is matching or not.
Thanks,
KumarIf any of the distribution is matched, the invoice should be taken as matched. Here is the modified query:
select ai.*
from ap_invoices_all ai
where not exists (select "matched"
from ap_invoice_distributions_all aid
where aid.invoice_id = ai.invoice_id
and aid.po_line_location_id is not null); -
Purchase Orders - Invoice Matching Option=PO with 4 way matching
Hi
i am new to AP and would like to clarify the following
what does the following combination mean ?
Invoice matching option = PO and 4 way matching.
Does it mean: invoice is matched against PO with out giving consideration for inspection and Delivery quantites ? because with 4 way matching, inspection, delivery are also matched, isnt it ?
kindly can someone clarify this confusion ?
Thanks in AdvanceHi ,
4 way matching should be with Receipt only , not with PO.
pl.refer following link to clear your doubts.
http://oracleappsyashrajvarsity.blogspot.in/2009/04/ramification-of-invoice-match-to-po-and.html
http://docs.oracle.com/cd/A60725_05/html/comnls/us/ap/point04.htm
HTH
Sanjay -
SRKIM: 11.5.10: AP: RECEIPT MATCH 된 INVOICE 조회 시 ORA-01427 가 발생할때
PROBLEM
======
Release 11.5.10:
AP INVOICE 화면에서 RECEIPT MATCH 된 INVOICE 조회 시 아래와 같은 ERROR 가 발생한다.
ORA-01427: single-row subquery returns more than one row
SOLUTION
======
해당 ISSUE 는 Bug 4270082: Querying Receipt Matched Invoice In Invoice Workbench Returns Ora-01427 에 의한 것으로 financials Family Pack H (AP.O) and higher 에서 해결이 되나 그 이전 VERSION 에서는 아래와 같이 CODEFIX 로 해결 해야 한다.
AP_HOLDS_V view source 에서 QUERY 부분을 아래와 같이 수정 한다.
수정 전:
SELECT DECODE(PLT.MATCHING_BASIS, 'QUANTITY',RTXN1.QUANTITY,
'AMOUNT', NULL) FROM RCV_TRANSACTIONS RTXN1 WHERE
RTXN1.PO_LINE_LOCATION_ID = PLL.LINE_LOCATION_ID AND
RTXN1.PARENT_TRANSACTION_ID = RTXN.TRANSACTION_ID AND
RTXN1.TRANSACTION_TYPE = 'ACCEPT'
수정 후:
SELECT DECODE(PLT.MATCHING_BASIS, 'QUANTITY',SUM(RTXN1.QUANTITY),
'AMOUNT', NULL) FROM RCV_TRANSACTIONS RTXN1 WHERE
RTXN1.PO_LINE_LOCATION_ID = PLL.LINE_LOCATION_ID AND
RTXN1.PARENT_TRANSACTION_ID = RTXN.TRANSACTION_ID AND
RTXN1.TRANSACTION_TYPE = 'ACCEPT'
REFERENCE
=======
Note. 306702.1 - APXINWKB Querying A Receipt Matched Invoice Results In ORA-01427 Error -
Quantity variance in Invoice Vs. Three way match in PO
Hi Experts,
I am not able to find any differrence between quantity variance Vs. Three way match in PO.
For example in our purchase orders for all the items we are having Two way match (PO-Inv, GR-Bsd Inv is not checked) but we have defined quantity varaince in Invoice. So when we are trying to post invoice for purchase order item for which goods reciept is not performed, system is blocking the invoice due to quantity variance.
So i think if you have quantity variance at invoice level then system is going to check whether goods reciept is perfromed or not regardless of Two way or three way match.
Please advise if my understanding above is correct.
My second question is as we can define two way/three way match at various level (Supplier, Inforecord etc.). Is there anyway that i can define that quantity variance in Invoice should be for certain material groups only.
Please advise.
Regards,
Kamalhi,
when you set the qty variance, and try to post the invoice just after the PO, the system will show a message at IR ie. " Quantity delivered is Zero"...
this message is warning message...
The system will block the invoice item when the doc is posted, depending on how the tolerance key DW is set(Qty variance to Gr qty = zero)...
Hope it helps..
Regards
Priyanka.P -
Need SQL query for PO that do NOT have 3-way match.
The question is -- have any PO"s been generated with other then 3-way match selected - which means they overrode the set-ups in purchasing , to see if there are an PO that do NOT have 3-way match.
Thanks
Mohan.1)Generally when ever we will do Supplier setup we will select in the Receiving tab Match approval level we will select either 3-way ,2-way,4-way or we will keep that as blank.
for that we do not have any direct column in the back end ,so we will use the following conditions.
'2WAY' inspection_required_flag = 'N'
receipt_required_flag = 'N'
'3WAY' inspection_required_flag = 'N'
receipt_required_flag = 'Y'
'4WAY' inspection_required_flag = 'Y'
receipt_required_flag = 'Y'
2)When ever we will create a PO in the shipments level what ever the Match approval level,
we defined in the supplier will automatically reflects in the shipments-More tab.
3)Here i wants to know all the PO's whihc are having Match approval level differences between supplier definiton and PO's match approval level.
(i.e If i will select a supplier for a PO , automatically we will get one Match approvallevel from supplier setup .if i will change that match approval level manually in the PO shipments -More tab i wants to know all that PO by using a SQL query.
4)But for some PO's i am getting receipt_required_flag and inspection_required_flag as null.But in the Supplier setup it may be one of the Matching approval.
Thanks
Mohan. -
Dear All,
I have to develop a report for "Matched PO receipts" with the following columns:
Receipt Date
Receipt Number
PO Number
Supplier Code
Supplier Name
Amount
Please look at this query, Could this solved my problem?
select to_char(rt.transaction_date,'yyyy-mm-dd')rct_date
,rsh.receipt_num rct_number
,pha.segment1 po_number
,rsh.vendor_id
,pv.vendor_name
,pvsa.vendor_site_code vendor_site
,sum(rt.amount_billed)amount
from rcv_transactions rt
,rcv_shipment_lines rsl
,rcv_shipment_headers rsh
,po_headers_all pha
,po_vendors pv
,po_vendor_sites_all pvsa
,po_distributions_all pda
,ap_invoice_distributions_all aida
where rt.shipment_line_id = rsl.shipment_line_id
and rsl.shipment_header_id = rsh.shipment_header_id
and rt.po_header_id = pha.po_header_id
and rsh.vendor_id = pvsa.vendor_id
and rsh.vendor_site_id = pvsa.vendor_site_id
and pvsa.vendor_id = pv.vendor_id
and rt.po_header_id = pda.po_header_id
and pda.po_distribution_id = aida.po_distribution_id
and rt.transaction_id = aida.rcv_transaction_id
and to_char(rt.transaction_date ,'yyyy/mm/dd')||' 00:00:00' between :p_date_from and :p_date_to
and rt.organization_id = :p_unit
group by to_char(rt.transaction_date,'yyyy-mm-dd')
,pha.segment1
,rsh.receipt_num
,rsh.vendor_id
,pv.vendor_name
,pvsa.vendor_site_code
order by 1,to_number(rsh.receipt_num)Hi,
Instead of taking the amount billed from rcv_transactions, you can take this value from ap_invoice_distributions_all. The query looks good, but what about the performance of this query?
Regards,
Jyoti -
Experts,
I have pruchase orders in the system that already have invoices receipt. The problem is that these invoices are greater that the amount of the purchase order.
I'm trying to build a abap query wich allows listing the Po's and the invoices that have been posted when the PO was already completed.
Unfortunately this invoices are blocked for payment, and no aproval WF was triggered!
How can i find this information, is there any tables to list this kind of information ?
Full points if helpful,
Thanks,
Mário.HI,
1.Use T.code: MB5S and get PO with GR & IV
2.Use T.code: MIR5 and select options and get the report og Invoice
3.Also try with ME80FN t.code
Regards,
Biju K
Maybe you are looking for
-
I have an older iMac running 10.5.8 and need to update to mountain lion, how do I go about it?
-
Setting up a Mac OS 10.6 Server for the first time
I'm new to servers, and I would like to set up a Mac Mini Server for my network. There would be 3 Windows clients running Vista Home Premium and 2 Mac OS 10.5 clients. I want to be able to log-in on any computer to an account from the server. Then I
-
When was an item last used in Keychain?
I am trying to clean up the entries in my Login keychain. A lot of the entries (passwords, certificates, etc) are cryptic, and it's hard to know what they are. Is there a way to find out when an entry was last used? When I say "last used", I mean
-
Hi All, i m trying to send a report via email using the command line it is working fine, but my problem is that it gives the file name Report which it sends through attachment, please tell me how i can change the file name Please also tell me can i a
-
Oh yes. another Motion 3 crash thread :)
Hey all Motion 3.0.2 was working fine and dandy and now suddenly quits out whenever I try to do anything with the file browser. Dont think I installed anything other than Apples latest security update so no idea whats changed. Got 2 crash records for