Query to find Credit Memos on an AP invoice

Query to find Credit Memos on an AP invoice
Oracle apps ebs Credit Memos on an AP invoice

  SELECT COUNT (DISTINCT ai2.invoice_num), ai1.invoice_num
    FROM ap.ap_invoices_all            ai1,
         ap.ap_invoice_distributions_all aid1,
         ap.ap_invoices_all            ai2
   WHERE     ai1.invoice_id = aid1.invoice_id
         AND aid1.parent_invoice_id = ai2.invoice_id
         AND ai1.org_id = ai2.org_id
GROUP BY ai1.invoice_num
Related posts: Upload your own post and refer it anywhere anytime:

Leave a Reply

%d bloggers like this: