SAP FOR GROUP BY AGGREGATES ABEXA



Get Example source ABAP code based on a different SAP table
  



ABAP_ITAB - Grouping with FOR for Aggregates
This example demonstrates aggregates with FOR expressions.

ABAP_SOURCE_CODE
DEMO CL_DEMO_FOR_GRPS_BY_AGGREGATES

ABAP_DESCRIPTION
This example works in the same way as the executable example for group loops with member loops and the executable example for group loops without member loops. Here, the group loop is also replaced by a FOR expression. The aggregates are calculated in a VALUE expression, to avoid having to specify the name of the structure too often. The descending sort of the member table members must be passed to a method here, since there is no corresponding additions in table comprehensions.