India Creditors Ledger Report
The India statutory creditors ledger — every transaction with each supplier (invoices, payments, debit and credit notes) with a running balance, in the supplier-ledger format Indian statutory accounts require.
Run note · Performance The subledger (XLA) join — especially Projects-to-XLA — is a known BI Publisher performance trap on large ledgers. Pre-join it in the warehouse, or apply tight ledger, period, and source filters before running online.
Sample build of the India Creditors Ledger Report — reconciled, and rendered tool-neutral so it runs in Power BI, ThoughtSpot, or Tableau.
| Supplier | Date | Document | Debit | Credit | Running Balance |
|---|---|---|---|---|---|
| Acme Industrial | 2026-04-30 | Sample | $1,240,500.00 | $1,240,500.00 | $1,240,500.00 |
| Northwind Trading | 2026-03-31 | — | $842,150.75 | $842,150.75 | $842,150.75 |
| Globex Holdings | 2026-02-28 | Sample | $96,400.00 | $96,400.00 | $96,400.00 |
| Initech LLC | 2026-01-31 | — | $1,005,233.10 | $1,005,233.10 | $1,005,233.10 |
| Umbrella Corp | 2025-12-31 | Sample | $58,720.40 | $58,720.40 | $58,720.40 |
| Acme Industrial | 2026-04-30 | Sample | $1,240,500.00 | $1,240,500.00 | $1,240,500.00 |
The report builds a per-supplier running ledger from AP transactions tied to their XLA accounting.
A few suppliers show payments or advances with no matching invoice, leaving a debit balance the statutory creditors format flags.
Apply the advances to invoices; an unapplied supplier advance is why a creditors ledger shows a debit where a credit belongs.
This is the report's BI Publisher data model — the SQL data set BI Publisher runs against Oracle tables to produce the output. The same SQL becomes a dbt model in your warehouse, so one definition drives both the formatted report and the analytics layer.
Data sources
Show / hide SQL
select
main.SUPPLIER_NUMBER,
main.SUPPLIER_NAME,
main.SUPPLIER_TYPE,
main.SUPPLIER_SITE,
main.GL_DATE,
main.PO_NUMBER,
main.INVOICE_TYPE,
main.AP_INVOICE_NUMBER,
main.AP_INVOICE_DATE,
main.PAYMENT_VOUCHER,
main.CHECK_NUM,
main.DESCRIPTION,
main.ACCOUNT_CODE,
main.CURRENCY_CODE,
nvl(main.EXCHANGE_RATE,1) EXCHANGE_RATE,
--main.OPENING_BALANCE,
main.FOREIGN_CURRENCY_DR,
main.FOREIGN_CURRENCY_CR,
main.RUPEE_EQUIVALENT_DR,
main.RUPEE_EQUIVALENT_CR,
--main.CLOSING_BALANCE,
(SELECT NVL(sum(XAL1.ACCOUNTED_DR),0) - NVL(sum(XAL1.ACCOUNTED_CR),0)
FROM XLA_AE_LINES XAL1
--,GL_CODE_COMBINATIONS GCC1
WHERE 1=1
--AND xal1.code_combination_id = gcc1.code_combination_id
AND xal1.party_id = main.party_id
AND xal1.party_site_id = main.party_site_id
--AND gcc1.code_combination_id = main.code_combination_id
AND xal1.accounting_class_code='LIABILITY'
AND xal1.application_id = main.application_id
AND xal1.gl_sl_link_id IS NOT NULL
AND TRUNC(xal1.accounting_date) < :P_FROM_DATE) Opening_Balance
from
(
select --xah.ACCOUNTING_DATE INVOICE_DATE ,
pos.vendor_name Supplier_Name,
pos.segment1 Supplier_Number,
pos.vendor_type_lookup_code Supplier_Type,
pssm.Vendor_Site_Code Supplier_Site,
to_char(xal.accounting_date,'MM/DD/YYYY') GL_Date,
(SELECT PHA.segment1
FROM ap_invoice_distributions_all AIDA
,po_distributions_all PDA
,po_headers_all PHA
WHERE PHA.po_header_id = PDA.po_header_id
AND PDA.po_distribution_id = AIDA.po_distribution_id
--AND AIDA.distribution_line_number = 1
AND AIDA.invoice_id = api.invoice_id AND ROWNUM=1
) PO_NUMBER,
alc.displayed_field Invoice_Type,
api.invoice_num AP_Invoice_Number,
TO_CHAR(api.Invoice_Date , 'MM/DD/YYYY') AP_Invoice_Date,
decode(api.doc_sequence_id, NULL,
api.voucher_num,
api.doc_sequence_value) Payment_Voucher,
null Check_num,
REPLACE(REPLACE(REPLACE(REPLACE(api.Description,CHR(10),' '),',',' '),'"',' '),CHR(13),' ') Description,
(Gcc.Segment1||'.'||Gcc.Segment2||'.'||Gcc.Segment3||'.'||Gcc.Segment4||'.'||Gcc.Segment5||'.'||Gcc.Segment6||'.'||Gcc.Segment7
||'.'||Gcc.Segment8||'.'||Gcc.Segment9) Account_Code,
xal.Currency_Code Currency_Code,
XAL.Currency_Conversion_Rate Exchange_Rate,
NVL(XAL.ENTERED_DR,0) Foreign_currency_dr,
NVL(XAL.ENTERED_CR,0) Foreign_currency_cr,
NVL(XAL.ACCOUNTED_DR,0) Rupee_Equivalent_dr,
NVL(XAL.ACCOUNTED_CR,0) Rupee_Equivalent_cr,
xal.party_id,
xal.party_site_id,
xal.code_combination_id,
xal.application_id,
xal.AE_LINE_NUM
from poz_supplier_sites_all_m pssm,
poz_suppliers_v pos,
xla_ae_lines xal,
xla_ae_headers xah,
xla_events xe,
xla_transaction_entities xte,
ap_invoices_all api,
gl_code_combinations gcc,
fun_all_business_units_v fub,
ap_lookup_codes alc
where 1=1
--trunc(xah.ACCOUNTING_DATE) BETWEEN :p_from_date AND :p_to_date AND
--and TRUNC(XAH.ACCOUNTING_DATE) >= sysdate-87
--and api.invoice_num = 'AP_INVACC_01'
and xal.application_id = xah.application_id
and xal.ae_header_id = xah.ae_header_id
and xal.ledger_id = xah.ledger_id
and xal.accounting_class_code='LIABILITY'
and xah.event_id = xe.event_id
and xe.application_id = xah.application_id
and xte.application_id = xe.application_id
and xte.entity_id = xe.entity_id
and xte.entity_code = 'AP_INVOICES'
and xte.source_id_int_1 = api.invoice_id
AND XTE.LEDGER_ID =api.SET_OF_BOOKS_ID
and xal.LEDGER_ID =api.SET_OF_BOOKS_ID
AND pos.vendor_id = api.vendor_id(+)
AND xal.party_id = pos.vendor_id
AND pos.vendor_id = pssm.vendor_id
AND xal.party_site_id = pssm.vendor_site_id
AND xal.code_combination_id = gcc.code_combination_id
AND api.org_id = fub.bu_id
AND alc.lookup_type = 'INVOICE TYPE'
AND alc.lookup_code = api.invoice_type_lookup_code
AND alc.enabled_flag ='Y'
AND (nvl(pos.VENDOR_NAME,'A') in NVL(:P_VENDOR_NAME, pos.VENDOR_NAME) OR 'All' in (:P_VENDOR_NAME ||'All'))
AND (nvl(pssm.VENDOR_SITE_ID,'A') in NVL(:P_VENDOR_SITE_ID,pssm.VENDOR_SITE_ID) OR 'All' in (:P_VENDOR_SITE_ID ||'All'))
AND (nvl(pos.VENDOR_TYPE_LOOKUP_CODE,'A') IN nvl(:P_VENDOR_TYPE_LOOKUP_CODE,pos.VENDOR_TYPE_LOOKUP_CODE) OR 'All' in (:P_VENDOR_TYPE_LOOKUP_CODE ||'All'))
AND TRUNC(XAH.ACCOUNTING_DATE) BETWEEN :P_FROM_DATE AND :P_TO_DATE
AND fub.BU_NAME = :P_BU_NAME
UNION
select
pos.vendor_name Supplier_Name,
pos.segment1 Supplier_Number,
pos.vendor_type_lookup_code Supplier_Type,
pssm.Vendor_Site_Code Supplier_Site,
to_char(xal.accounting_date,'MM/DD/YYYY') GL_Date,
null PO_NUMBER,
--aca.PAYMENT_METHOD_CODE Invoice_Type,
'Payments' Invoice_Type,
null AP_Invoice_Number,
to_char(aca.CHECK_DATE,'MM/DD/YYYY') AP_Invoice_Date,
to_char(decode(aca.doc_category_code, NULL,
aca.check_voucher_num,
aca.doc_sequence_value)) Payment_Voucher,
aca.CHECK_NUMBER Check_num,
REPLACE(REPLACE(REPLACE(REPLACE(aca.Description,CHR(10),' '),',',' '),'"',' '),CHR(13),' ') Description,
(Gcc.Segment1||'.'||Gcc.Segment2||'.'||Gcc.Segment3||'.'||Gcc.Segment4||'.'||Gcc.Segment5||'.'||Gcc.Segment6||'.'||Gcc.Segment7
||'.'||Gcc.Segment8||'.'||Gcc.Segment9) Account_Code,
xal.Currency_Code Currency_Code,
XAL.Currency_Conversion_Rate Exchange_Rate,
NVL(XAL.ENTERED_DR,0) Foreign_currency_dr,
NVL(XAL.ENTERED_CR,0) Foreign_currency_cr,
NVL(XAL.ACCOUNTED_DR,0) Rupee_Equivalent_dr,
NVL(XAL.ACCOUNTED_CR,0) Rupee_Equivalent_cr,
xal.party_id,
xal.party_site_id,
xal.code_combination_id,
xal.application_id,
xal.AE_LINE_NUM
from poz_supplier_sites_all_m pssm,
poz_suppliers_v pos,
xla_ae_lines xal,
xla_ae_headers xah,
xla_events xe,
xla_transaction_entities xte,
ap_checks_all aca ,
gl_code_combinations gcc,
fun_all_business_units_v fub
where
1=1
--trunc(xah.ACCOUNTING_DATE) BETWEEN :p_from_date AND :p_to_date AND
--and TRUNC(XAH.ACCOUNTING_DATE) >= sysdate-87
--and api.invoice_num = 'AP_INVACC_01'
and xal.application_id = xah.application_id
and xal.ae_header_id = xah.ae_header_id
and xal.ledger_id = xah.ledger_id
and xal.accounting_class_code='LIABILITY'
and xah.event_id = xe.event_id
and xe.application_id = xah.application_id
and xte.application_id = xe.application_id
and xte.entity_id = xe.entity_id
and xte.entity_code = 'AP_PAYMENTS'
and xte.source_id_int_1 = aca.CHECK_ID
-- AND XTE.LEDGER_ID =api.SET_OF_BOOKS_ID
--and xal.LEDGER_ID =api.SET_OF_BOOKS_ID
AND pos.vendor_id = aca.vendor_id(+)
AND xal.party_id = pos.vendor_id
AND pos.vendor_id = pssm.vendor_id
AND xal.party_site_id = pssm.vendor_site_id
AND xal.code_combination_id = gcc.code_combination_id
AND aca.org_id = fub.bu_id
AND (nvl(pos.VENDOR_NAME,'A') in NVL(:P_VENDOR_NAME, pos.VENDOR_NAME) OR 'All' in (:P_VENDOR_NAME ||'All'))
AND (nvl(pssm.VENDOR_SITE_ID,'A') in NVL(:P_VENDOR_SITE_ID,pssm.VENDOR_SITE_ID) OR 'All' in (:P_VENDOR_SITE_ID ||'All'))
AND (nvl(pos.VENDOR_TYPE_LOOKUP_CODE,'A') IN nvl(:P_VENDOR_TYPE_LOOKUP_CODE,pos.VENDOR_TYPE_LOOKUP_CODE) OR 'All' in (:P_VENDOR_TYPE_LOOKUP_CODE ||'All'))
AND TRUNC(XAH.ACCOUNTING_DATE) BETWEEN :P_FROM_DATE AND :P_TO_DATE
AND fub.BU_NAME = :P_BU_NAME
) main
where 1=1
ORDER BY main.supplier_name,main.Supplier_Site,main.GL_DATE ASCThe data-warehouse model — one fact surrounded by conformed dimensions (what you slice by) and measures (what you aggregate), expressed as dbt so it migrates with you. Grain: one row per source transaction.
| Element | Type | Definition |
|---|---|---|
| AP_INVOICE_DISTRIBUTIONS_ALL | dimension | dimension |
| XLA_AE_LINES | dimension | dimension |
| POZ_SUPPLIERS_V | dimension | dimension |
| PO_HEADERS_ALL | dimension | dimension |
| Debit | measure | measure |
| Credit | measure | measure |
| Running Balance | measure | measure |
Every source object behind this report. Each linked table has its own page with full column descriptions, drawn from the Oracle BICC lineage and articulated for practitioners.
| Table | Reporting columns | Subject areas |
|---|---|---|
| AP_INVOICES_ALL | 63 | 15 |
| AP_INVOICE_DISTRIBUTIONS_ALL | 59 | 11 |
| XLA_AE_LINES | 23 | 17 |
| POZ_SUPPLIERS_V | 2 | 24 |
| PO_HEADERS_ALL | 72 | 62 |