Ansicht
Dokumentation

ABAPSORT_KEY - SORT KEY

ABAPSORT_KEY - SORT KEY

Addresses (Business Address Services)   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.
SAP E-Book

SORT, sort_key

Short Reference



... BY field1 $[ASCENDING$|DESCENDING$] $[AS TEXT$]
       field2 $[ASCENDING$|DESCENDING$] $[AS TEXT$]
       ...


Additions

1. ... ASCENDING$|DESCENDING

2. ... AS TEXT

Effect

When a sort key is specified using the addition BY, sorting is not done by field group header, but by the field1 field2 ... fields specified after it. For field1 field2 ..., only components of field group header or field groups that contain only fields of field group header can be specified. The sort order depends on the order in which the components field1 field2 ... are specified. The number of fields to be used for sorting is limited to 50.

For field1 field2 ..., field symbols can also be specified. If a component of the field group header is assigned to a field symbol when the statement is executed, sorting takes place according to the corresponding component. If no data object is assigned to a field symbol, the specification is ignored. If a different data object is assigned to a field symbol, an uncatchable exception is raised.

Note

No customizing includes may be specified for field1 field2 ... if they are empty.

Addition 1

... ASCENDING$|DESCENDING

If, after a component field1 field2 ..., neither of the ASCENDING or DESCENDING additions is specified, the predefined sort direction is applied. If one of the additions ASCENDING or DESCENDING is specified, it overwrites the default for this component.

Addition 2

... AS TEXT

Without the addition AS TEXT after a text-like component field1 field2 ..., the default is applied. If the addition AS TEXT is specified after a text-like component, it overwrites the default for this component. In the case of non-text-like components, AS TEXT cannot be specified. If AS TEXT is specified after a field group, the addition only affects the text-like components of this group.






CL_GUI_FRONTEND_SERVICES - Frontend Services   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.

Length: 3078 Date: 20240425 Time: 170500     sap01-206 ( 61 ms )