ACCUM function
- Last Updated: February 11, 2026
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
Returns the value of an aggregate expression that is calculated by an
ACCUMULATE or aggregate phrase of a DISPLAY
statement.
Syntax
|
- aggregate-phrase
- A phrase that identifies the aggregate value it should return.
This is the syntax for aggregate-phrase:
{ AVERAGE | COUNT | MAXIMUM | MINIMUM | TOTAL | SUB-AVERAGE | SUB-COUNT | SUB-MAXIMUM | SUB-MINIMUM | SUB-TOTAL } [ BY break-group]For more information on aggregate items, see the Aggregate phrase reference entry.
- expression
- An expression that was used in an earlier
ACCUMULATEorDISPLAYstatement. The expression you use in theACCUMULATEorDISPLAYstatement and the expression you use in theACCUMfunction must be in exactly the same form. (For example, "on-hand * cost" and "cost * on-hand" are not in exactly the same form.) For theAVERAGE,SUB-AVERAGE,TOTAL, andSUB-TOTALaggregate phrases, expression must be numeric.
Example
This procedure shows a total for the extended price of each item on an order. The running total of the order is displayed as well as the order total and grand total for all orders. This procedure accumulates totals at three levels.
r-accum.p
|
See also
ACCUMULATE statement, AGGREGATE statement, DISPLAY statement