Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

symbols while sorting

Former Member
0 Likes
549

Hi,

I have designed an ALV report with 10 fields.

While sorting in standard reports there will be a small triangle symbol will be displayed in the field header.

how to enable that in my customized report.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
518

Is the symbol one of the field ?? What type it is ??

What is the content for Items in this field ??

If items are blank, i believe Sort itab by Symbol descending F1 F2 should do.

Regards,

Diwakar

3 REPLIES 3
Read only

franois_henrotte
Active Contributor
0 Likes
518

when calling function module REUSE_ALV_GRID_DISPLAY, sorted field must be set in IT_SORT of type SLIS_T_SORTINFO_ALV

if you are calling directly the class CL_GUI_ALV_GRID then you have to SET_SORT_CRITERIA with IT_SORT of type LVC_T_SORT

Read only

Former Member
0 Likes
519

Is the symbol one of the field ?? What type it is ??

What is the content for Items in this field ??

If items are blank, i believe Sort itab by Symbol descending F1 F2 should do.

Regards,

Diwakar

Read only

Former Member
0 Likes
518

Hi Ramya,

In the function module REUSE_ALV_GRID_DISPLAY, you need to make use of table IT_SORT.



DATA: it_sort TYPE slis_t_sortinfo_alv,
      wa_sort LIKE LINE OF it_sort.

CLEAR wa_sort.
wa_sort-fieldname = 'VBELN'.... your 1st column to be sorted.
wa_sort-tabname = 'ITAB'....... your internal table name.
wa_sort-up = 'X'.
APPEND wa_sort TO it_sort.

CLEAR wa_sort.
wa_sort-fieldname = 'MATNR'.... your 2nd column to be sorted.
wa_sort-tabname = 'ITAB'....... your internal table name.
wa_sort-up = 'X'.
APPEND wa_sort TO it_sort.

Now use IT_SORT in function module REUSE_ALV_GRID_DISPLAY.

Regards,

Danish.