Ansicht
Dokumentation

ABENLOOP_GROUP_BY_AGGREGATES_ABEXA - LOOP GROUP BY AGGREGATES ABEXA

ABENLOOP_GROUP_BY_AGGREGATES_ABEXA - LOOP GROUP BY AGGREGATES ABEXA

Fill RESBD Structure from EBP Component Structure   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.
SAP E-Book

- Grouping with LOOP for Aggregates

This example demonstrates a grouping with aggregates.

Source Code

Execute

Description

In a group loop across an internal table numbers grouping is performed by the content of the column key and, for the groups, the usual SQL aggregates sum, maximum, minimum, and average are calculated for the second column num. The output is the group members and the associated aggregates. The example enables a maximum number of different key values and lines in the internal table to be entered. The values in the second column are random numbers between 1 and 100.

The example above demonstrates an implementation with a member loop. A further executable example shows how the member loop can be replaced by table comprehensions and table reductions while preserving the function. Another executable example demonstrates how the entire group loop can be implemented using expressions.






CPI1466 during Backup   CPI1466 during Backup  
This documentation is copyright by SAP AG.

Length: 1433 Date: 20240426 Time: 083739     sap01-206 ( 34 ms )