Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Sort alv grid

Hi SAP

I have a problem during the Sorting of the data displayed on my Alv grid.

In particular data are sorted but the rows with the same values are not merged, why?

this is my sort table:

wa_sort-spos = '01'.

wa_sort-fieldname = 'MATNR'.

wa_sort-up = 'X'.

wa_sort-group = 'X'.

APPEND wa_sort TO a_sort.

CLEAR wa_sort.

wa_sort-spos = '02'.

wa_sort-fieldname = 'WERKS'.

wa_sort-up = 'X'.

APPEND wa_sort TO a_sort.

CLEAR wa_sort.

wa_sort-spos = '03'.

wa_sort-fieldname = 'LGORT'.

wa_sort-up = 'X'.

APPEND wa_sort TO a_sort.

CLEAR wa_sort.

and the methos Set_table_for_first_display

CALL METHOD g_grid7->set_table_for_first_display

EXPORTING

  • i_structure_name = 'SFLIGHT'

is_layout = gs_layout

CHANGING

it_outtab = t_7[]

it_fieldcatalog = gt_fieldcat7

it_sort = a_sort.

thanks to all,

bella pe voi!

Former Member
Not what you were looking for? View more on this topic or Ask a question