AP Aging — Overdue Payables
Every open supplier invoice, sorted by how overdue it is — so you can see what's due, what's late, and which suppliers to pay first. Built on I_OperationalAcctgDocItem and tied to the supplier sub-ledger.
Sample build of the AP Aging report — bucketed by net due date as of a key date, tied to the Manage Supplier Line Items balance, and rendered tool-neutral so it runs in Power BI, SAC, or Tableau.
| Supplier | Current | 1–30 | 31–60 | 60+ | Total |
|---|---|---|---|---|---|
| 4800033 · Globex Logistics | 2,010,000 | 120,000 | — | — | 2,130,000 |
| 4800021 · Northwind Steel | 820,000 | 410,000 | 290,000 | 1,100,000 | 2,620,000 |
| 4800015 · Acme Components | 1,240,000 | 180,000 | 40,000 | — | 1,460,000 |
| 4800048 · Initech Services | 980,000 | 60,000 | 35,000 | — | 1,075,000 |
Open supplier items are bucketed by net due date — invoice baseline date plus payment terms — as of the key date, by supplier and company code, and tied to the Manage Supplier Line Items balance.
Supplier 4800021 (Northwind Steel) has 1.10M past 60 days — 42% of its balance — yet its terms are NET 30. That points to disputed invoices or a posting issue, not normal lateness.
Route the 60-plus items to AP for dispute / clearing review before the next payment run. Clearing or disputing them corrects the aging and frees the cash forecast.
The report's query logic — it reads the released CDS view I_OperationalAcctgDocItem (vendor lines), works out each item's due date, and sorts it into aging buckets. The same SQL becomes a dbt model in your warehouse.
Show / hide SQL
WITH ap_open AS (
SELECT it.CompanyCode,
it.Supplier,
it.GLAccount AS recon_account,
je.AccountingDocument,
je.FiscalYear,
it.AmountInCompanyCodeCurrency AS open_amount,
it.PaymentTerms,
it.NetPaymentDays,
ADD_DAYS(it.DocumentItemDate,
TO_INTEGER(it.NetPaymentDays)) AS net_due_date,
DAYS_BETWEEN(ADD_DAYS(it.DocumentItemDate,
TO_INTEGER(it.NetPaymentDays)),
:P_KEY_DATE) AS days_overdue
FROM I_JournalEntry AS je
JOIN I_OperationalAcctgDocItem AS it
ON je.CompanyCode = it.CompanyCode
AND je.AccountingDocument = it.AccountingDocument
AND je.FiscalYear = it.FiscalYear
WHERE it.FinancialAccountType = 'K' -- K = vendor (Kreditor)
AND it.CompanyCode = :P_COMPANY_CODE
AND it.ClearingDate IS NULL -- open as of the key date
)
SELECT Supplier,
SUM(CASE WHEN days_overdue <= 0 THEN open_amount ELSE 0 END) AS current_not_due,
SUM(CASE WHEN days_overdue BETWEEN 1 AND 30 THEN open_amount ELSE 0 END) AS d_1_30,
SUM(CASE WHEN days_overdue BETWEEN 31 AND 60 THEN open_amount ELSE 0 END) AS d_31_60,
SUM(CASE WHEN days_overdue > 60 THEN open_amount ELSE 0 END) AS d_60_plus,
SUM(open_amount) AS total_open
FROM ap_open
GROUP BY Supplier
ORDER BY d_60_plus DESC;The 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 open AP item.
| Element | Type | Definition |
|---|---|---|
| dim_supplier | dimension | Supplier — Business Partner (supplier role), name, group |
| dim_company_code | dimension | Company code & ledger context |
| dim_gl_account | dimension | Reconciliation (payables) account — RACCT |
| dim_date | dimension | Conformed calendar on the net due date |
| open_amount | measure | Open amount in company-code currency (HSL) |
| days_overdue | measure | Key date minus net due date |
| aging_bucket | measure | Current / 1–30 / 31–60 / 60+ derived from days_overdue |
Every source object behind this report. Each linked object has its own page — with its fields and its real S/4HANA status, so you build on the right thing.
| Object | Role | Key fields | S/4HANA status |
|---|---|---|---|
| I_OperationalAcctgDocItem | Vendor line item with payment terms — the read object | released | Released CDS view |
| ACDOCA | Universal Journal — the open amount & account assignment | 6 PK · 360+ | Transparent table |
| BSEG | Open-item management & payment terms (baseline date, net days) | 4 PK | Transparent table |
| Business Partner | Supplier master (supplier role) — the dimension | BUT000 | Transparent table |
| BSIK / BSAK | Legacy vendor open/cleared index — reference only, do not extract | — | Compat view → ACDOCA |
| C_APFlexibleAging | SAP's standard AP aging grid (Aging Analysis app) — reference | released | Released CDS view |
- AP aging
- Open supplier invoices grouped by how overdue they are.
- Net due date
- When an invoice is actually due: its baseline date plus the payment-term days.
- ACDOCA
- SAP's single table holding every finance posting (the "Universal Journal").
- BSEG
- The table that still manages open items and payment terms in S/4HANA.
- CDS view
- Core Data Services — an SAP-supplied, upgrade-safe view onto the data.
- I_OperationalAcctgDocItem
- The released view that gives the vendor line with its terms (account type K = vendor).
- Business Partner
- The single S/4HANA master for suppliers and customers (table BUT000).
- BSIK / BSAK
- The old vendor open / cleared tables — now compatibility views; don't extract them.
- SLT
- SAP Landscape Transformation — SAP's real-time table-copy tool.
- ODP-RFC
- An older extraction route SAP now bans for non-SAP tools (Note 3255746).
- star schema
- A simple, report-friendly layout: one "facts" table with "lookup" tables around it.