Start a project

RCT2 table in SAP Business One (Incoming Payments (invoices paid))

RCT2 is the SAP Business One table that lists the documents an incoming payment pays: one row per invoice, credit memo or journal entry line, with the amount applied in SumApplied. RCT2.DocNum is the key of the payment (ORCT.DocEntry), while RCT2.DocEntry is the key of the paid document and InvType is its object type.

What is the RCT2 table in SAP B1?

RCT2 is the SAP Business One table that links incoming payments to the documents they pay. Each row is one paid invoice, credit memo or journal entry with the amount applied (SumApplied). RCT2.DocNum joins to ORCT.DocEntry, the payment header; RCT2.DocEntry is the key of the paid document and InvType says which kind it is.

Where is the RCT2 table in SAP B1?

In SAP Business One 10.0, RCT2 is the "Incoming Payments - Invoices" table with 71 columns. You see its data in Banking → Incoming Payments → Incoming Payments (header table ORCT).

TableRCT2 Incoming Payments - Invoices (child of ORCT)
Object type (ObjType)24 (oIncomingPayments), the object type of ORCT
Menu pathBanking → Incoming Payments → Incoming Payments
DI API objectPayments
Service Layer entityIncomingPayments (request builder)
Columns71 in SAP B1 10.0 (SDK database tables reference)

RCT2 key fields

FieldSAP typeWhat it holds
DocNumInt(11)Key of the payment. Joins to ORCT.DocEntry (not to ORCT.DocNum).
InvoiceIdInt(11)Row number inside the payment.
DocEntryInt(11)Key of the paid document, for example OINV.DocEntry.
InvTypenVarChar(20)Object type of the paid document, stored as text: 13 = A/R invoice, 14 = A/R credit memo, 30 = journal entry.
SumAppliedNum(19,6)Amount applied to the document, in local currency.
AppliedFC / AppliedSysNum(19,6)Amount applied in foreign currency / in system currency.
DcntSumNum(19,6)Cash discount amount given on the row.
InstIdInt(6)Installment number of the paid document.
DocRateNum(19,6)Exchange rate of the row.
OcrCodenVarChar(8)Distribution rule (cost center).

Types as listed in the SAP Business One 10.0 SDK database tables reference: nVarChar(n) is text of up to n characters, Num(19,6) a decimal with 6 places. Column names are the same on SQL Server and SAP HANA.

How RCT2 relates to other tables

RCT2 is a child table of ORCT. One payment can pay many documents, and one invoice can be paid by many payments, so RCT2 is the link between the two. InvType tells you which table DocEntry belongs to: 13 is OINV, 14 is ORIN and 30 is a journal entry. A payment on account, received without choosing a document, adds no RCT2 row.

Common joins

  • RCT2 T1 INNER JOIN ORCT T0 ON T0.DocEntry = T1.DocNum (payment header)
  • RCT2 T1 INNER JOIN OINV T2 ON T2.DocEntry = T1.DocEntry AND T1.InvType = '13' (A/R invoices paid)
  • RCT2 T1 INNER JOIN ORIN T3 ON T3.DocEntry = T1.DocEntry AND T1.InvType = '14' (A/R credit memos used)

When you use the RCT2 table

Use RCT2 to show the payment date next to each invoice, to calculate commission on paid invoices only, to measure days to pay per customer, and to list what one payment closed.

Example query: a/r invoices with the payments applied to them

SQL Server

SELECT T2.DocNum AS InvoiceNum, T2.CardCode, T2.DocTotal, T0.DocNum AS PaymentNum,
  T0.DocDate AS PaymentDate, T1.SumApplied
FROM ORCT T0
INNER JOIN RCT2 T1 ON T1.DocNum = T0.DocEntry
INNER JOIN OINV T2 ON T2.DocEntry = T1.DocEntry AND T1.InvType = '13'
WHERE T0.Canceled = 'N'
ORDER BY T2.DocNum, T0.DocDate

SAP HANA (column names in double quotes)

SELECT T2."DocNum" AS "InvoiceNum", T2."CardCode", T2."DocTotal", T0."DocNum" AS "PaymentNum",
  T0."DocDate" AS "PaymentDate", T1."SumApplied"
FROM ORCT T0
INNER JOIN RCT2 T1 ON T1."DocNum" = T0."DocEntry"
INNER JOIN OINV T2 ON T2."DocEntry" = T1."DocEntry" AND T1."InvType" = '13'
WHERE T0."Canceled" = 'N'
ORDER BY T2."DocNum", T0."DocDate"

Paste either version in Tools → Queries → Query Generator. Need the other dialect for your own query? Use the SQL to HANA converter.

Common pitfall: DocNum and DocEntry mean the opposite here

In RCT2, DocNum is the internal key of the payment (ORCT.DocEntry) and DocEntry is the key of the paid document. Joining RCT2.DocNum to ORCT.DocNum looks right and returns wrong rows as soon as the two numbers differ. Also filter InvType when you join the paid document: DocEntry 100 can be an invoice and a credit memo at the same time. See ORCT table (incoming payments).

Ready-made queries that use RCT2

Building something on RCT2?

Reading RCT2 (Incoming Payments (invoices paid)) in a query is the easy part. We build Crystal Reports and Power BI dashboards for SAP Business One on SQL Server and HANA, and you own the files. Or hire a dedicated SAP B1 developer for the whole job, fixed price per phase.

Questions about the RCT2 table

What is the RCT2 table in SAP B1?

RCT2 is the SAP Business One table that links incoming payments to the documents they pay. Each row is one paid invoice, credit memo or journal entry with the amount applied (SumApplied). RCT2.DocNum joins to ORCT.DocEntry, the payment header; RCT2.DocEntry is the key of the paid document and InvType says which kind it is.

How do I join RCT2 to ORCT in SAP B1?

RCT2.DocNum = ORCT.DocEntry. RCT2.DocNum holds the internal key of the payment, not the payment number users see.

How do I find which invoices an incoming payment paid?

Read RCT2 for the payment (RCT2.DocNum = ORCT.DocEntry) and join OINV on OINV.DocEntry = RCT2.DocEntry with RCT2.InvType = '13'. SumApplied is the amount applied to each invoice.

What does InvType mean in RCT2?

It is the object type of the paid document, stored as text: 13 = A/R invoice, 14 = A/R credit memo and 30 = journal entry. Compare it with quotes in SQL.

Why does a payment have no rows in RCT2?

It is a payment on account: money received without choosing an invoice. RCT2 only gets a row for each document picked on the payment.

Related tables

ORCT (Incoming Payments (header)) · OINV (A/R Invoice (header)) · ORIN (A/R Credit Memo (header)) · VPM2 (Outgoing Payments (invoices paid)) · search all SAP Business One tables

Sources: SAP Business One documentation and SDK (DI API database tables reference), SAP Help Portal; SDK 10.0 table page for RCT2.

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.