INV6 table in SAP Business One (A/R Invoice (installments))
INV6 is the SAP Business One table that stores the installments of each A/R invoice: one row per invoice and installment, with its due date, amount, amount paid and status. Every invoice has at least one row. Join it to OINV on DocEntry to age receivables by installment due date instead of the invoice due date.
INV6 key fields
| Field | What it holds |
|---|---|
DocEntry | Internal key of the invoice. Joins to OINV.DocEntry. |
InstlmntID | Installment number within the invoice, starting at 1. |
ObjType | Object type, 13 for A/R invoices. |
DueDate | Due date of this installment. |
Status | O = open, C = closed. |
InstPrcnt | Installment as a percentage of the invoice. |
InsTotal / InsTotalFC / InsTotalSy | Installment amount in local, foreign and system currency. |
PaidToDate / PaidFC / PaidSys | Amount already paid on this installment. |
VatSum / VatPaid | Tax amount of the installment and tax paid to date. |
DunnLevel | Dunning level reached by this installment. |
WTSum / WTApplied | Withholding tax amount and withholding tax applied. |
How INV6 relates to other tables
INV6 is a child table of OINV, like INV1, but it splits the invoice by payment date instead of by item. Join INV6.DocEntry = OINV.DocEntry; the pair DocEntry plus InstlmntID is unique. The number of installments comes from the payment terms of the invoice (OINV.GroupNum points to OCTG, where InstNum holds the number of installments).
Common joins
OINV T0 INNER JOIN INV6 T1 ON T1.DocEntry = T0.DocEntry (installments of the invoice)OINV T0 INNER JOIN OCTG T2 ON T2.GroupNum = T0.GroupNum (payment terms)OINV T0 INNER JOIN OCRD T3 ON T3.CardCode = T0.CardCode (customer)
When you use the INV6 table
Use INV6 for receivables aging by installment, for collection lists of what falls due this week, and to check partial payments on invoices that are paid in parts. Companies that sell on installment terms (for example 30/60/90 days) need it, because the invoice due date alone shows only the last date.
Example query: open installments with days overdue
SQL Server
SELECT T0.DocNum, T0.CardCode, T0.CardName, T1.InstlmntID, T1.DueDate, T1.InsTotal, T1.PaidToDate, T1.InsTotal - T1.PaidToDate AS OpenAmount, DATEDIFF(day, T1.DueDate, GETDATE()) AS DaysOverdue FROM OINV T0 INNER JOIN INV6 T1 ON T1.DocEntry = T0.DocEntry WHERE T1.Status = 'O' AND T0.CANCELED = 'N' ORDER BY T1.DueDate, T0.DocNum
SAP HANA (column names in double quotes)
SELECT T0."DocNum", T0."CardCode", T0."CardName", T1."InstlmntID", T1."DueDate", T1."InsTotal", T1."PaidToDate", T1."InsTotal" - T1."PaidToDate" AS "OpenAmount", DAYS_BETWEEN(T1."DueDate", CURRENT_TIMESTAMP) AS "DaysOverdue" FROM OINV T0 INNER JOIN INV6 T1 ON T1."DocEntry" = T0."DocEntry" WHERE T1."Status" = 'O' AND T0."CANCELED" = 'N' ORDER BY T1."DueDate", T0."DocNum"
Paste either version in Tools → Queries → Query Generator. Need the other dialect for your own query? Use the SQL to HANA converter.
Common pitfall: Aging on OINV.DocDueDate when invoices have installments
An invoice split into three installments has one DocDueDate on the header, but three due dates in INV6. An aging report on OINV alone shows the whole open amount as due on one date. Read INV6 when payment terms have more than one installment, and sum InsTotal minus PaidToDate per installment. See Customer A/R aging query.
Ready-made queries that use INV6
- Customer aging report (AR aging): Open invoice balance per customer in 0–30, 31–60, 61–90 and 90+ day buckets by due date.
- Overdue customer invoices: Open invoices past their due date, with days overdue and the customer phone number.
Questions about the INV6 table
Does every A/R invoice have a row in INV6?
Yes. An invoice without installment payment terms has one row with InstlmntID 1 for the full amount; invoices with installments have one row per installment.
How do I join INV6 to OINV?
On INV6.DocEntry = OINV.DocEntry. DocEntry plus InstlmntID identifies one installment.
What do the Status values in INV6 mean?
O means the installment is open and C means it is closed (fully paid or closed with the invoice).
Related tables
OINV (A/R Invoice (header)) · INV1 (A/R Invoice (lines)) · OCTG (Payment Terms) · OCRD (Business Partners) · search all SAP Business One tables
Sources: SAP Business One documentation and SDK (DI API database tables reference), SAP Help Portal.
Ready to get started?
Tell us what you need. You get a clear technical answer, a fixed scope and a price, usually within 24 hours.
