ABAP Keyword Documentation → ABAP − Short Reference
SORT - Short Reference
Other versions: 7.31 | 7.40 | 7.54
Syntax
SORT [ASCENDING|DESCENDING]
[AS TEXT]
[STABLE]
[BY {field1 [ASCENDING|DESCENDING] [AS TEXT]}
{field2 [ASCENDING|DESCENDING] [AS TEXT]}
...].
Effect
Obsolete
Additions
-
ASCENDING
Sorts in ascending order. -
DESCENDING
Sorts in descending order. -
AS TEXT
Sorts text-like components in accordance with the locale of the current text environment. -
STABLE
Ensures stable sorting by retaining the relative order of non-affected lines. -
BY field1 ... field2 ...
Sorts by specified fieldsfield1
,field2
, ... instead of by field groupheader
.