SAP Function F4UT_PARAMETER_SORT - Standard search help exit: Sort hit list by an attribute

Parameter Reference Type Length Default Optional Text
DESCENDING DDBOOL_D C 1 ' ' X Sort descending
LEADING_COLUMNS DDSHLCOL N 1 '0' X Number of lead columns to be taken into consideration
PARAMETER_SORT C C 0 ' ' X Name of parameter to be used for sorting

Parameter Reference Type Length Default Optional Text
CALLCONTROL DDSHF4CTRL u 108 Control of the F4 process
SHLP SHLP_DESCR_T 0 Single (Current) Search Help

Parameter Reference Length Optional Text
RECORD_TAB SEAHLPRES 1016 Hit list
SHLP_TAB SHLP_DESCR_TAB_T 0 Table of Elementary Search Helps

Functionality
This module can be used to change how the hit list of an input help issorted. Normally the hit list is sorted according to the first tencolumns displayed. This module can be used to sort the hit listaccording to another characteristic (which might not be in the hit listat all).
The input help must be defined with anelementary search help. Thecharacteristics according to which the hit list should be sorted mustbe defined as search help parameters ofthe serach help. The search help must also have this module or a modulethat calls this one as search help exit.
The name of the search help parameter used for sorting must be passedto this module in IMPORT parameter PARAMETER_SORT. You can alsoleave this parameter as initial and give the search help a parameterwith this name containing the name of the sort criteria.
If the hit list is sorted according to more than one parameter, theirnames must be defined in PARAMETER_SORT separated with commas, and thecommas may not be followed by a space. The parameters must be definedin decreasing order of their sort relevance.
The described functionality overrides the normal behavior, in whichconstant lead columns are extracted and placed above the hit list. Ifyou want to keep at least some of this behavior, you can define thenumber of lead columns to be taken into consideration in parameterLEADING_COLUMNS.
If this parameter has a value other than '0', you will first sortaccording to the given number of lead columns and then according to thespecifically defined characteristics. The specified lead columns areextracted as usual.
If parameter LEADING_COLUMNS is initial, but the processed search helphas a parameter with this name, the contents of this search helpparameter are used.

Notes
Normally you will sort in increasing order. If you want to sort indecreasing order, you must set the IMPORT parameter to DESCENDING
.
Sorting is stable. You can mix increasing and decreasing sorts bycalling this module several times in a search help exit.
The essential work of the module is carried out attimepoint DISP. Therefore if the module iscalled from a search help exit that itself performs the selection andthus itself switches the timepoint to DISP, this module should becalled after switching. In this case the search help exit is not calledagain at timepoint DISP so that this module would not be called at allat timepoint DISP.