‎2014 Jan 28 9:29 AM
Hi
Please see attachments. I created a search help and a function module exit as extract method. This is linked to my program parameter and works fine. However, the user would like the output to be sorted in descending order of time. The extract is only for current date. How can I do this in the search help? I'm already sorting the data during the SQL, but when it outputs, the sorting is according to the key field and in ascending order. I'd like it to be descending by default, but don't find a setting to do so? Please assist.
Thanks,
Adrian
‎2014 Jan 28 9:57 AM
You can change the default sort order for search help by using this FM 'F4UT_PARAMETER_SORT'
Eg.:
If you want a table to be sorted by carrid and connid,
data:
w_sort(20) type c value 'CARRID CONNID'.
Now pass w_sort to the parameter PARAMETER_SORT in the FM.
Dont call the FM twice. Use a character work variable which has the field names separated by space and pass that work variable to the FM.
‎2014 Jan 28 9:34 AM
Hi Adrian,
Can you write like below after filling internal table
Sort gt_out by uzeit by descending.
Arivazhagan S
‎2014 Jan 28 9:35 AM
Hi,
In 'DISPLAY' event, add the sorting logic.
IF callcontrol-step = 'DISPLAY'.
SORT xyz by uzeit descending.
ENDIF.
Regards,
DPM
‎2014 Jan 28 9:57 AM
You can change the default sort order for search help by using this FM 'F4UT_PARAMETER_SORT'
Eg.:
If you want a table to be sorted by carrid and connid,
data:
w_sort(20) type c value 'CARRID CONNID'.
Now pass w_sort to the parameter PARAMETER_SORT in the FM.
Dont call the FM twice. Use a character work variable which has the field names separated by space and pass that work variable to the FM.
‎2014 Jan 28 10:04 AM
In your case pass variable UZEIT
data:
w_sort(20) type c value 'UZEIT'.
Now pass w_sort to the parameter PARAMETER_SORT in the FM.
set decending flag also
U will get it...
Rewards if helpful
Regards,
Hemanth
‎2014 Jan 28 10:09 AM
Hi,
Write below code in your exit at last,
case callcontrol-step.
when 'DISP'.
Sort gt_out by uzeit by descending.
endcase.
Regards,
‎2014 Jan 28 10:26 AM
Hi Adrian
You are doing sorting in SELECT but do this in last DISPLAY step
Nabheet
‎2014 Jan 28 10:47 AM
Sorting data while selecting will not help. You need to sort the data while display.
Thanks!
VS
‎2014 Jan 28 12:19 PM