SAP GROUPING FUNCTION ABEXA



Get Example source ABAP code based on a different SAP table
  



SELECT, Grouping Function
This example demonstrates the grouping function GROUPING.

ABAP_SOURCE_CODE
DEMO CL_DEMO_GROUPING_FUNCTION

ABAP_DESCRIPTION
For Lufthansa flights, this example calculates the sum of the maximum available seats depending on the plane type (column planetype ), the connection (column connid), and the carrier (column carrid).
The grouping function for the plane type column, connection column, or carrier column is used to determine whether they are part of the aggregation. The following combinations of the grouping sets are used to do this:
( carrid, connid, planetype )
( carrid, connid )
( carrid, planetype )
( connid, planetype )
( carrid )
( connid )
( planetype )
Empty grouping set ( ).