‎2006 Aug 17 6:05 PM
Hello All,
I need an ALV output with pushbuttons to select only one row at a time.I prepare the layout with <b>gt_layout-sel_mode = 'D'</b>. This solves my purpose, but this gives me layout with the option to select all rows at once. I dont need that. I dont need that 'select all' ICON on the top-left corner. I am using method <b>set_table_for_first_display</b> to display table.
Can somebody help me?
Thanks,
Chandu
‎2006 Aug 17 6:12 PM
while passing the parameters to method SET_METHOD_FOR_FIRST_DISPLAY, pass the function code of Selectall and deslect all to the importing parameter IT_TOOLBAR_EXCLUDING, and you will not get those buttons on the output of the grid.
function code for DEselect all: '&SAL'
similarly for select all : '&ALL'.
Message was edited by: Sharath kumar R
‎2006 Aug 17 6:17 PM
data: p_tb_exclude type ui_functions.
APPEND CL_GUI_ALV_GRID=>MC_FC_DESELECT_ALL
TO p_tb_exclude.
APPEND CL_GUI_ALV_GRID=>MC_FC_SELECT_ALL
TO p_tb_exclude.
CALL METHOD grid1->set_table_for_first_display
EXPORTING is_variant = gs_variant
i_save = x_save
is_layout = gs_layout
IT_TOOLBAR_EXCLUDING = p_tb_exclude
CHANGING it_fieldcatalog = gt_fieldcat
it_outtab = <gt_table>.
‎2006 Aug 17 6:19 PM
Note the "p_tb_exclude" references above.
Don't forget points for helpful answers.
‎2006 Aug 17 6:22 PM
‎2006 Aug 17 6:29 PM
‎2006 Aug 17 6:44 PM
Exactly, select all ICON appears on the corner of the ALV list, not on the toolbar. I was thinking of changing the <b>IS_LAYOUT-SEL_MODE</b> to some other value instead of 'D'. Anybody can help me?
Thanks,
Chandu
‎2006 Aug 17 6:55 PM
No, changing that value will not make a difference, if the selection column is there, the select all icon will be there.
Not sure that you can get rid of this icon. Even if you could, use can still select multiple row by holding down CTRL or by Click and hold on one row and drag cursor down, this highlights all rows in between.
Regards,
Rich Heilman
‎2006 Aug 17 7:01 PM
I have reviewed some SAP documentation about this object; and the Select All buttons is attached automatcially to the grid when it is set to editable.
There is no attribute to remove.
Hopefully, in a newer version of the control, this will be possible.