‎2006 Mar 17 9:57 AM
I have an alv grid
For example I sort by a column personal number. and the same personal number appears several times...
The personal number is displayed on each line! Normally it should display the personal number on the first line and the other lines should be blank...
What should i do ? Did i give invalid data to the layout!
Regards,
S
‎2006 Mar 17 10:03 AM
havu u used it_sort-up = 'X'.
chk this for further info
‎2006 Mar 17 10:16 AM
Stephan,
Just make sure that in the layout NO_MERGING is not set to 'X'.
Regards,
Ravi
Note : Please reward the posts that help you.
‎2006 Mar 17 10:23 AM
Make the personal number field in the sort table just
like below :
Refresh
REFRESH gt_sort_stat.
Document Number
CLEAR gt_sort_stat.
gt_sort_stat-spos = 1.
gt_sort_stat-fieldname = 'DOCNUM'. " Give personal num.
gt_sort_stat-up = gc_mark.
APPEND gt_sort_stat.
Method to display the alv grid !!
CALL METHOD gv_grid_sta->set_table_for_first_display
EXPORTING
i_save = gv_save
is_layout = gv_layout
is_print = gv_print
is_variant = gv_variant
CHANGING
it_sort = gt_sort_stat[]
it_fieldcatalog = gt_fieldcat_sta[]
it_outtab = gt_idoc_stat[].
Then your problem will be solved.
‎2006 Mar 17 10:33 AM
Guys,
This grouping is a standard functionality of alv, Except ** layout have to contain exception field
lw_layout-excp_fname = 'EXCEPTION'.
lw_layout-cwidth_opt = 'X'.
* lw_layout-zebra = 'X'.
lw_layout-info_fname = 'LINE_COLOR'.I didn't do anything! So for me sorting as you advice is maybe working but I shouldn't do this!!