Wednesday, September 29, 2021

Query to get AWT Invoice for given Standard Invoice in Oracle Payables.

 SELECT wht_inv.invoice_id

  FROM ap_invoices_all std_inv

      ,ap_invoice_distributions_all std_inv_dist

      ,ap_invoices_all wht_inv

WHERE std_inv.invoice_id = 123456789

  AND std_inv.invoice_id = std_inv_dist.invoice_id

  AND std_inv.org_id = std_inv_dist.org_id

  AND std_inv_dist.awt_invoice_id = wht_inv.invoice_id

  AND std_inv.org_id = wht_inv.org_id


Where 123456789 is the Standard Invoice ID.

Query to get Parent and Child Accounts in Oracle APPS R12

SELECT ffv1.flex_value parent_account       ,ffvt1.description parent_account_desc   ,ffv2.flex_value child_account   ,ffvt2.description...