aggregate_sap_table
Compute SAP table totals in one call using SUM, AVG, MIN, MAX, COUNT, or COUNTD with filters and grouping, avoiding row paging for finance reporting.
Instructions
Totals computed in SAP: one call instead of paging rows. measures: comma list of SUM:f, AVG:f, MIN:f, MAX:f, COUNT, COUNTD:f (results named SUM_HSL, ROW_COUNT, COUNTD_BELNR...). group_by: comma fields (empty = one row). where: ABAP Open SQL. order_by: result columns, e.g. "SUM_HSL DESC" with top=20. top max 1000. E.g. TB: table=ACDOCA, measures=SUM:HSL, group_by=RACCT, where="RLDNR = '0L' AND RBUKRS = '1000' AND GJAHR = '2026'".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | ||
| table | Yes | ||
| where | No | ||
| group_by | No | ||
| measures | No | COUNT | |
| order_by | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |