ABAP Keyword Documentation → ABAP − Reference → Processing External Data → ABAP Database Access → Object Services → Query Service
Sort Conditions
A sort condition is a list of attributes attr that specifies the direction in which they are sorted. Only attributes with an elementary type can be specified. For each attribute, an order must be specified, either ascending or descending. and this information is placed after the attribute. Only public attributes can be used.
Other versions:
7.31 | 7.40 | 7.54
ASCENDING
attr ASCENDING
DESCENDING
attr DESCENDING
Note
The sort condition and its parameter list are analyzed when a query is executed and transformed into an internal display. To bypass parsing each time the query is executed, the methods of the interface IF_OS_QUERY_EXPR_FACTORY can be used to create multiple-use sort conditions in the internal display.
Example
price ASCENDING date DESCENDING