1 Reply Latest reply: Nov 17, 2013 1:38 PM by Neeraj_Shrivastava RSS

    3 way match question

    936954

      Hi,

       

      In Oracle, we have the 3 way match process

      Can anyone please provide the query behind how the 3 way match process can be verified.

       

      I mean we verify if the

      Quantity billed <=Quantity Ordered

      Invoice price <=Purchase Order price

      Quantity billed <= “Quantity ordered

       

      Where do we get the values from. i mean which column and which table we get these quantity_Billed, quantity_ordered etc..

       

      Thank you

        • 1. Re: 3 way match question
          Neeraj_Shrivastava

          The best way to determine if the 3-WAY match process is followed or an Invoice is a 3-way MATCH or not is using the

           

          INSPECTION_REQUIRED_FLAG and RECEIPT_REQUIRED_FLAG from PO_LINE_LOCATIONS_ALL

           

           

          INSPECTION_REQUIRED_FLAGRECEIPT_REQUIRED_FLAGMatch Approval
          NN2-Way
          NY3-Way
          YY4-Way

           

           

          SELECT  AIA.*
          FROM    AP_INVOICE_DISTRIBUTIONS_ALL  APD

                      ,PO_DISTRIBUTIONS_ALL POD

                      ,PO_LINE_LOCATIONS_ALL POLL

          ,AP_INVOICES_ALL AIA

               WHERE APD.PO_DISTRIBUTION_ID = POD.PO_DISTRIBUTION_ID

               AND   POD.LINE_LOCATION_ID = POLL.LINE_LOCATION_ID

               AND   APD.invoice_id = p_invoice_id

          AND   APD.invoice_id = AIA.invoice_id

               AND   APD.line_type_lookup_code <> 'TAX'

               AND   NVL(POLL.INSPECTION_REQUIRED_FLAG,'N') = 'N'

               AND   POLL.RECEIPT_REQUIRED_FLAG = 'Y';