JA India - Creditors Trial Balance Report- Not Supported: Reserved For Future Use

Description
Categories: BI Publisher
Imported from BI Publisher
Description: India-Creditors Trial Balance Report
Application: Asia/Pacific Localizations
Source: India - Creditors Trial Balance Report (XML) - Not Supported: Reserved For Future Use
Short Name: JAINCTRB_XML
DB package: JA_JAINCTRB_XMLP_PKG
Run JA India - Creditors Trial Balance Report- Not Supported: Reserved For Future Use and other Oracle EBS reports with Blitz Report™ on our demo environment
SELECT SUM(abs(apd.amount))  amount,
               api.vendor_id, 
               api.invoice_currency_code, 
               api.org_id,
               api.accts_pay_code_combination_id accts, 
	JA_JAINCTRB_XMLP_PKG.cf_addrformula(api.org_id) CF_addr, 
	JA_JAINCTRB_XMLP_PKG.cf_acctsformula(api.accts_pay_code_combination_id) CF_accts, 
	JA_JAINCTRB_XMLP_PKG.cf_addr1formula(api.org_id) CF_addr1, 
	JA_JAINCTRB_XMLP_PKG.cf_vendor_typeformula(api.vendor_id) CF_vendor_type, 
	JA_JAINCTRB_XMLP_PKG.cf_vendor_nameformula(api.vendor_id) CF_vendor_name, 
	JA_JAINCTRB_XMLP_PKG.cf_vendor_codeformula(api.vendor_id) CF_vendor_code, 
	JA_JAINCTRB_XMLP_PKG.cf_entered_amountformula(api.accts_pay_code_combination_id, api.vendor_id, api.org_id, api.invoice_currency_code) CF_entered_amount, 
	JA_JAINCTRB_XMLP_PKG.cf_re_amtformula(api.accts_pay_code_combination_id, api.org_id, api.vendor_id, api.invoice_currency_code) CF_re_amt
FROM   ap_invoices_all api,
              ap_invoice_distributions_all apd,
              po_vendors pov,
              ap_supplier_sites povs
WHERE api.invoice_id = apd.invoice_id
AND       api.vendor_id = pov.vendor_id
AND       pov.vendor_id = povs.vendor_id
AND       api.vendor_site_id = povs.vendor_site_id
&LP_SELECTED_VENDOR_ID
&LP_SELECTED_VENDOR_NO
AND      ( 
                (:p_vendor_type_lookup_code is null)
                OR
                ( (:p_vendor_type_lookup_code is not null) and (pov.vendor_type_lookup_code = :p_vendor_type_lookup_code) )
               )  
AND     TRUNC(apd.accounting_date) <= TRUNC(:p_as_of_date)
AND     (api.org_id = :p_org_id ) 
AND     apd.match_status_flag =  'A'         
AND     DECODE(povs.accts_pay_code_combination_id, NULL, povs.accts_pay_code_combination_id, povs.accts_pay_code_combination_id) = NVL(:p_accts_id, DECODE(povs.accts_pay_code_combination_id, NULL, povs.accts_pay_code_combination_id, povs.accts_pay_code_combination_id))
GROUP BY api.org_id, api.accts_pay_code_combination_id,  
  api.vendor_id, api.invoice_currency_code
  order by api.org_id,accts,api.vendor_id, amount DESC,
               api.invoice_currency_code
Parameter Name SQL text Validation
Operating Unit
 
LOV
Vendor Name
 
LOV Oracle
Vendor Number
 
LOV Oracle
Vendor Type
 
LOV Oracle
Account Code
 
Char
As Of Date
 
Date
Blitz Report™