2012 May 11 9:52 AM
Hi all,
I have sort criterion as below. However I face an issue, if the ebeln is not the same but the ebelp is same, the ebelp column is merging in the ALV which is not what I want. Does that a way to not merge the cell when the ebelp is same(while the ebeln is different).
FORM init_sort.
CLEAR gs_sort.
gs_sort-fieldname = 'EBELN'.
gs_sort-spos = 1.
gs_sort-down = gc_x.
APPEND gs_sort TO gt_sort.
CLEAR gs_sort.
gs_sort-fieldname = 'EBELP'.
gs_sort-spos = 2.
gs_sort-up = gc_x.
APPEND gs_sort TO gt_sort.
ENDFORM. "init_sort
2012 May 11 10:00 AM
Old issue, ALV cell merging is not smart enough to recognize combined sort columns, it just compares the previous rows values for each column separately. Not sure how this behaves e.g. in Web Dynpro ALV.
Cannot be fixed, as far as I know, or would like to learn how.
Thomas
2012 May 11 10:09 AM
Hi,
In Change layout button of standard ALV toolbar, go to last tab named "Display" there are some properties of ALV there you can mange cell merging setting for ALV during sort.
Use this setting and save default layout will solve your problem.
In coding , use "cell_merge" field of ALV layout "slis_layout_alv".
Thanks and Regards,
Gagan
2012 May 11 11:58 AM
This just switches cell merging on and off altogether. What we want is "smart" merging, factoring in a multi-column sort order, i.e. not merging identical values when there are non-identical values to the left.
Thomas