Reputation: 371
I have a report which shows an ALV. After double clicking on a certain column, some fields in the ALV become customizable. This is done by setting the 'edit' attribute of the fieldcatalog-row for the column to 'X'.
<fs_field_cat_line>-edit = 'X'.
When I set the updated fieldcatalog, optimize its width and refresh the ALV
* setting fieldcatalog
lo_alv_grid->set_frontend_fieldcatalog( it_fieldcatalog = lt_field_catalog ).
* Optimizing column width
ls_layout-cwidth_opt = 'X'.
lo_alv_grid->set_frontend_layout( is_layout = ls_layout ).
* refresh ALV
lo_alv_grid->refresh_table_display( ).
The ALV gets get a new column at the start which can be used to select multiple rows, or when clicking at the top, select all rows.
How do I disable this Column. After refreshing, I do not want this column to appear. I have tried looking at what happens with the debugger but I can't seem to find it.
EDIT: After implementing the accepted solution below, the changes look like this:
* setting fieldcatalog
lo_alv_grid->set_frontend_fieldcatalog( it_fieldcatalog = lt_field_catalog ).
* Optimizing column width
ls_layout-cwidth_opt = 'X'.
* Disabling selection column
ls_layout-sel_mode = 'A'.
ls_layout-no_rowmark = 'X'.
* setting layout
lo_alv_grid->set_frontend_layout( is_layout = ls_layout ).
* refresh ALV
lo_alv_grid->refresh_table_display( ).
Upvotes: 3
Views: 12468
Reputation: 18483
According to the documentation, you have to
NO_ROWMARK
flag of the grid to X
andSEL_MODE
setting of the grid to either A
or D
. The default ' '
is interpreted as B
which AFAIR ignores the NO_ROWMARK
flag.Upvotes: 4