How many documents per company code?
Table BKPF · Max. hits 500
BKPF · Accounting document header
| Field | Technical name | Selection | Set on the field |
|---|---|---|---|
| Company Code | BUKRS | — |
|
| Fiscal Year | GJAHR | 2026 |
Equivalent ABAP SQL (simplified)
SELECT FROM bkpf
FIELDS bukrs, COUNT(*) AS entries
WHERE gjahr = '2026'
GROUP BY bukrs
INTO TABLE @DATA(result).What you get
One line per company code with the number of documents. Group adds the count column on its own.
Tip
Leave Fiscal Year empty to count the whole table. On SAP HANA this answers online, in seconds, what used to need a TAANA job.