SQL QUERY FOR AP INVOICES

This forum is to discuss different features/issues of Oracle Financials modules ( GL - General Ledger, AP - Accounts Payable, AR - Accounts Receivable, FA - Fixed Assets & CM - Cash Management ).
Post Reply
SANJUPAL19
Posts: 6
Joined: Tue Jun 23, 2009 8:37 am
Location: India

SQL QUERY FOR AP INVOICES

Post by SANJUPAL19 »

HI ALL,

I want help for a SQL query in which i can find the following relation

SUPPLIER NAME---SITE CODE----DATE----INVOICE NO.----DESCRIPTION-----GL CODE COMBINATION

Basiclly i want to the GL -- Subledger Report --- from where i can find the all invoices in a particular GL like Professional Charges.

Thanks,
Sanjay Khandelwal
oteixeira
Posts: 451
Joined: Wed Aug 27, 2008 12:34 pm
Location: Portugal

Post by oteixeira »

Hello.

Here's the query (APPS 11.5)
You may need to enter more segments from the code combinations.

Code: Select all

select v.vendor_name Vendor, 
       vs.vendor_site_code Site,
       i.invoice_date InvDate,
       i.invoice_num Nr,
       d.description Descripiton,
       cc.segment1||'.'||cc.segment2||'.'||cc.segment3 CC
from ap_invoices_all i, 
     ap_invoice_distributions_all d,
     po_vendors v,
     po_vendor_sites_all vs,
     gl_code_combinations cc
where d.invoice_id = i.invoice_id
and v.vendor_id = vs.vendor_id
and vs.vendor_site_id = i.vendor_site_id
and cc.code_combination_id = d.dist_code_combination_id
and i.org_id = <your org_id>
and d.accounting_date >= 'start date'
and d.accounting_date <= 'end date'
Hope this helps.
Octavio
SANJUPAL19
Posts: 6
Joined: Tue Jun 23, 2009 8:37 am
Location: India

Post by SANJUPAL19 »

Hi,

Really this is a very useful script....

Thanks a lot for such information.
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests