SAP LOOP GROUP BY LVLS NST ABEXA



Get Example source ABAP code based on a different SAP table
  



ABAP_ITAB - Grouping with LOOP, Nesting
This example demonstrates nested group level processing using GROUP BY.

ABAP_SOURCE_CODE
DEMO CL_DEMO_LOOP_GRP_BY_LEVELS_NST

ABAP_DESCRIPTION
This example works in the same way as the executable example for group level processing with nested groups . The member loop of the outer group loop is itself a group loop using the addition GROUP BY and contains a further member loop. The group keys of the outer and inner grouping are constructed by specifying the required columns explicitly and, unlike in group level processing, do not depend on the structure of the table and its sorting. The totals of the space used per group are calculated explicitly.
The executable example for grouping with FOR demonstrates how the nested group loops can be implemented using expressions.