Incoming payments by date
Customer payments received in a period, split into cash, transfer, check and card.
Tool
SELECT T0.DocNum, T0.DocDate, T0.CardCode, T0.CardName, T0.CashSum, T0.TrsfrSum, T0.CheckSum, T0.CreditSum, T0.DocTotal FROM ORCT T0 WHERE T0.Canceled = 'N' AND T0.DocDate BETWEEN '[%0]' AND '[%1]' ORDER BY T0.DocDate, T0.DocNum
SELECT T0."DocNum", T0."DocDate", T0."CardCode", T0."CardName", T0."CashSum", T0."TrsfrSum", T0."CheckSum", T0."CreditSum", T0."DocTotal" FROM ORCT T0 WHERE T0."Canceled" = 'N' AND T0."DocDate" BETWEEN '[%0]' AND '[%1]' ORDER BY T0."DocDate", T0."DocNum"
What this query answers
When reconciling the bank statement or preparing the daily cash report, the cashier needs every customer receipt in the period split by payment means. It shows at a glance how much came in by transfer versus cash, check or card.
Sample output
Illustrative demo values. Your columns are the same; the numbers come from your company.
| DocNum | DocDate | CardCode | CardName | CashSum | TrsfrSum | CheckSum | CreditSum | DocTotal |
|---|---|---|---|---|---|---|---|---|
| 1201 | 2026-10-01 | C20000 | Acme Trading | 0 | 5250 | 0 | 0 | 5250 |
| 1202 | 2026-10-01 | C30000 | Northwind Retail | 800 | 0 | 0 | 0 | 800 |
| 1203 | 2026-10-02 | C40000 | Blue Harbor Foods | 0 | 0 | 3400 | 0 | 3400 |
| 1204 | 2026-10-03 | C50000 | Summit Supplies | 0 | 0 | 0 | 1175.5 | 1175.5 |
SQL Server vs SAP HANA
The ORCT column is spelled Canceled (mixed case), not CANCELED as on invoices, and HANA's quoted identifiers are case-sensitive, so it must be "Canceled". The date parameters stay as '[%0]' and '[%1]'; only the quoting changes.
Common errors and fixes
- Invalid column name 'CANCELED' on ORCT: Payments use Canceled, invoices use CANCELED. SQL Server usually ignores the case, but HANA does not, so copy the column name exactly.
- Rows with no customer name: Payments posted to a G/L account (payment on account type 'A') have no business partner. Filter with T0.DocType = 'C' to keep customer receipts only.
- Bank amounts do not match for foreign-currency receipts: CashSum, TrsfrSum, CheckSum, CreditSum and DocTotal are local currency. Use the FC columns (TrsfrSumFC, DocTotalFC and so on) to match a foreign-currency bank account.
Need this report built into SAP Business One?
A saved query answers the question once. We build SAP Business One customer portals: customers see their prices, stock, order status, invoices and statements, and their orders land in SAP as sales orders. Or hire a remote SAP Business One developer for the whole job, fixed price per phase.
Related queries
Table reference: ORCT table (Incoming Payments (header))
Three steps, no signup
Copy the right version
Use the SQL Server tab for MS SQL databases and the HANA tab for SAP B1 on HANA.
Open Query Generator
In SAP Business One go to Tools → Queries → Query Generator, paste and click Execute.
Save and share
Click Save, pick a category and give the query a name. Your team can run it from Query Manager.
Questions about this tool
How do I run the incoming payments by date query in SAP Business One?
Copy the version that matches your database, open Tools → Queries → Query Generator, paste it in the SQL box and click Execute. Save it to reuse it later.
Which tables does this query use?
It reads ORCT from the standard SAP Business One schema. No user-defined fields are needed.
What should I enter when the selection window opens?
This query uses parameters: [%0] = from date, [%1] = to date. SAP B1 shows a selection window for each one when you run it.
Can this be turned into a dashboard or alert?
Yes. We turn queries into Crystal reports, Excel reports that refresh themselves, SAP B1 alerts or WhatsApp messages for managers.
Built for SAP Business One teams
Need this inside SAP Business One?
We build add-ons, reports and integrations for SAP B1 on SQL Server and HANA. Tell us what you need and get a fixed price, usually within 24 hours.
