Identifying a 3 way match PO/Invoice/Receipt with SQL

Sort:
You are not authorized to post a reply.
Author
Messages
mikekask
Basic Member
Posts: 10
Basic Member
    I am trying to extract by SQL a count of the total PO lines of PO's that have a 3 way match of PO/Invoice/Receipt. I am using this total as the denominator to calculate the percentage of electronically processed PO's versus non-electronically processed PO's that could potentially be electronically processed. I've been told that to be electronically processed there has to be a three way match. For my numerator of the electronically processed PO's I am matching the POLINE table with the APINVOICE table and selecting on the criteria of APINVOICE.OPERATOR = 'EDI'

    Does anyone know how to determine by an SQL Query whether there has been a match for a Receipt for a PO/Invoice?

    Thanks.
    Mike
    Ruma Malhotra
    Veteran Member
    Posts: 412
    Veteran Member
      For electronically processed pos if GHX and EDI are being used MA540 is the program that brings the invoices from EDI into lawson. These invoices can then be automatched by a program which is MA126. Once they error out which means the match was not perfect and you have buyser messages they can be resolved manually at ma60.3 or ma60.2 if they are detail or header match setup.

      The main table that tells you which invoices were matched or not and whether they have outstanding buyer messages is the MAINVMSG and the operator for electronically processed invoices is 'MA540'.

      On APINVOICE there is a match_flag field that will tell you whether the invoice was matched or not.

      hth.
      You are not authorized to post a reply.