ORCT table in SAP Business One (Incoming Payments (header))
ORCT is the SAP Business One table that stores the header of every incoming payment: who paid, when, and how much by cash, transfer, check and credit card. Checks are in RCT1, the invoices the payment closes are in RCT2 and credit card lines are in RCT3, all linked to ORCT.DocEntry. Its object type is 24.
ORCT key fields
| Field | What it holds |
|---|---|
DocEntry | Internal key. RCT1, RCT2 and RCT3 point to it through their DocNum column. |
DocNum | Payment number users see, unique per numbering series. |
DocDate | Posting date of the payment. |
DocType | C = customer, S = vendor, A = account (payment straight to G/L accounts, no business partner). |
CardCode | Business partner code (empty when DocType = A). Joins to OCRD.CardCode. |
CashSum | Amount received in cash, posted to CashAcct. |
TrsfrSum | Amount received by bank transfer, posted to TrsfrAcct on TrsfrDate. |
CheckSum | Total of the checks in RCT1. |
CreditSum | Total of the credit card lines in RCT3. |
DocTotal | Total payment amount in local currency (DocTotalFC in foreign currency). |
NoDocSum | Payment on account: the part not applied to any document. |
Canceled | N = normal, Y = cancelled, C = the cancellation itself. |
TransId | Journal entry created by the payment. Joins to OJDT.TransId. |
How ORCT relates to other tables
ORCT is the header. RCT2 lists the documents the payment pays: RCT2.DocNum is the ORCT.DocEntry of the payment, while RCT2.DocEntry is the key of the paid document and RCT2.InvType says what that document is (13 = A/R invoice, 14 = A/R credit memo, 30 = journal entry, and so on). SumApplied is the amount applied to each document. RCT1 holds one row per check (CheckNum, DueDate, BankCode, CheckSum) and RCT3 one row per credit card voucher (CreditCard, VoucherNum, CreditSum). The posting itself is in OJDT/JDT1 through TransId.
Common joins
ORCT T0 INNER JOIN RCT2 T1 ON T1.DocNum = T0.DocEntry (paid documents)RCT2 T1 INNER JOIN OINV T2 ON T2.DocEntry = T1.DocEntry AND T1.InvType = '13' (A/R invoices paid)ORCT T0 LEFT JOIN RCT1 T3 ON T3.DocNum = T0.DocEntry (checks)ORCT T0 LEFT JOIN RCT3 T4 ON T4.DocNum = T0.DocEntry (credit cards)ORCT T0 LEFT JOIN OCRD T5 ON T5.CardCode = T0.CardCode (customer master)
When you use the ORCT table
Use ORCT for daily cash reports, bank reconciliation and collection reports per customer or per collector. Use RCT2 when you need to know which invoices a payment closed, for example to calculate commission on paid invoices only, or to show the payment date next to each invoice. RCT1 is what you need for a post-dated check register.
Example query: invoices paid by each incoming payment
SQL Server
SELECT T0.DocNum AS PaymentNo, T0.DocDate, T0.CardCode, T0.CardName, T2.DocNum AS InvoiceNo, 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 T0.DocDate, T0.DocNum
SAP HANA (column names in double quotes)
SELECT T0."DocNum" AS "PaymentNo", T0."DocDate", T0."CardCode", T0."CardName", T2."DocNum" AS "InvoiceNo", 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 T0."DocDate", 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: Cancelled payments still sit in ORCT
A cancelled incoming payment is not deleted. It stays in ORCT with Canceled = 'Y', so a cash report without that filter counts money that was given back. Always add Canceled = 'N'. The second trap is the name clash in RCT2: its DocNum is the payment key and its DocEntry is the paid document key, the opposite of what the names suggest. See Incoming payments query.
Ready-made queries that use ORCT
- Incoming payments by date: Customer payments received in a period, split into cash, transfer, check and card.
- Customer balances: All customers with a non-zero account balance, with credit limit and phone.
- Customer aging report (AR aging): Open invoice balance per customer in 0–30, 31–60, 61–90 and 90+ day buckets by due date.
Related tables
OVPM (Outgoing Payments (header)) · OINV (A/R Invoice (header)) · OJDT (Journal Entry (header)) · 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.
