09-01-2009 10:15 AM
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!
09-01-2009 11:01 AM
09-01-2009 11:21 AM
09-01-2009 11:26 AM
alwais the same problem with the '*',
the olny differences with the example is the fieldcat build manually,
can be this the problem?
09-02-2009 2:52 AM
Hi Ballante,
<li>In your above code, you have set wa_sort-group = 'X'. But it is wrong. You need to set value either * (star) for Page feed (incl. underline) or UL for Underline.
<li> Try to change the above one and execute. It should work now.
Thanks
Venkat.Owa_sort-spos = '01'.
wa_sort-fieldname = 'MATNR'.
wa_sort-up = 'X'.
wa_sort-group = 'X'.
APPEND wa_sort TO a_sort.
CLEAR wa_sort.