Get Example source ABAP code based on a different SAP table
Sorting Internal Tables Dynamically This example demonstrates how internal tables are sorted dynamically using an expression.
ABAP_SOURCE_CODE DEMO CL_DEMO_SORT_ITAB_EXP
ABAP_DESCRIPTION The method sort_itab> sorts an internal table using the statement SORT itab>>, where the sort criteria are specified as a table of type abap_sortorder_tab> constructed using the value operator VALUE>> . The component descending> of this table is set using a conditional expression> with the case distinction SWITCH >>, depending on the input parameter direction>.