ARTIClE
Sorting Internal Tables
This example demonstrates how internal tables are sorted using
SORT itab .
ABAP_SOURCE_CODE
ABAP_EXEC
ABAP_DESCRIPTION
Four sort operations are carried out on a standard table with a key
field. First, the table ( land ) is sorted twice in succession by
its key without using the STABLE addition. The sort is instable.
The order of rows in which multiple keys appear can change. Next, the
same sort is carried out with the STABLE addition. The sort is
stable. The order of the rows remains the same. Finally, it is sorted
using a new sort key, defined using land and weight . The
normal sort order is descending, but for weight ascending is
defined.
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved