Ansicht
Dokumentation

ABENFOR_GROUP_BY_LEVELS_ABEXA - FOR GROUP BY LEVELS ABEXA

ABENFOR_GROUP_BY_LEVELS_ABEXA - FOR GROUP BY LEVELS ABEXA

Addresses (Business Address Services)   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.
SAP E-Book

- Grouping with FOR in Group Levels

This example demonstrates simple group level processing using GROUP BY in a FOR expression.

Source Code

Execute

Description

This example works in the same way as the corresponding executable example for LOOP AT ... GROUP BY, but uses the expression FOR GROUPS ... OF for a table reduction with REDUCE instead of the group loop. In both cases, the group key after GROUP BY is constructed in exactly the same way.

The result of the table reduction is a structure to which the total of the numeric columns is written. The subtotals and the group members are written to the local helper variables sum and members using a further table reduction and a table comprehension. This table reduction table comprehension could also be used in the executable example for LOOP AT ... GROUP BY instead of the member loop. loop.






General Data in Customer Master   Vendor Master (General Section)  
This documentation is copyright by SAP AG.

Length: 1962 Date: 20240425 Time: 192030     sap01-206 ( 39 ms )