01-07-2017 9:39 AM
Hi ,
Can anyone tell how to remove the select all button in oo alv grid..
I have tried various things and did R&D ,but could not get the required result..
Please find the attachment ..
Regards,
Rohan
01-07-2017 10:32 AM
01-07-2017 10:41 AM
I guess this button is present only when the layout is setup to allow selecting several lines at a time. I think the default behavior is maximum one line, but anyway, to do it:
Via CL_GUI_ALV_GRID, set this value via the layout : LVC_S_LAYO-SEL_MODE = 'B'
Via CL_SALV_TABLE, use lo_table->get_selections( )->set_selection_mode( IF_SALV_C_SELECTION_MODE=>SINGLE ).
01-07-2017 11:06 AM
Hi Sandra,
I have tried the same code ,what happens is entire column is dissappeared..
Please see the attachment..
I just want to remove the SELECT ALL icon ..
Regards,
Rohan
01-07-2017 3:05 PM
I don't find a way to remove it. I think it's handled differently than the classic buttons in the top of the ALV grid control (these buttons may be hidden). Why do you need to remove it, by the way?
01-09-2017 5:27 AM
Hi Sandra,
As per my Client request ,I need to remove that icon..
Regards,
Rohan
01-09-2017 11:50 AM
That's not an answer. Why is your client requesting the icon be removed? What is the business requirement behind the request?
01-07-2017 10:42 AM
Hi Sandra,
Thank you for reply..
I have used CL_GUI_ALV_GRID for displaying the grid..so that is the reason why that SELECT ALL button is coming defaultly..Now I need to hide or remove it..Please suggest is there any way..
Regards,
Rohan
01-09-2017 6:52 AM
Hi,
Could you please share the screen shot of your ALV Grid Display Output.
Thanks ,
Vamsi.
01-09-2017 8:27 AM
01-09-2017 6:57 AM
Hi,
Actually in your class, method-- CL_GUI_ALV_Grid=>Set_table_for_first_Display ...We have a parameter like IT_TOOLBAR_EXCLUDING there you can pass what ever you want to hide then it will be disappear as per you mention FCODE over there in the above Parameter IT_TOOLBAR_Excluding.
Hope it would be helpful for your problem...
Thanks,
Vamsi
01-09-2017 8:32 AM
Hi Vamsi,
If i wanted to remove the tool bar icons ,then i need to populate that parameter..
I want to remove the Select All icon which is deputed into ALV grid..Please check the above image which i have marked..
Regards,
Rohan
01-09-2017 6:59 AM
If you are not able in your version to disable the function selet all, try to handle event before_user_command, there 'intercept' this command e_ucomm = cl_gui_alv_grid=>mc_fc_select_all, there reset the function code with mygrid->set_user_command( i_ucomm = space ).
Regards,
Raymond
01-20-2020 9:12 PM
Assign 'X' to your layout-no-rowmark.
DATA: go_grid TYPE REF TO cl_gui_alv_grid,
ls_layout TYPE lsv_s_layo,
lt_fieldcat TYPE lvc_t_fcat,
gt_alv TYPE (You table to display).
CREATE OBJECT go_grid.
ls_layout-no_rowmark = 'X'.
* Fulfill your lt_fiedcat
* Fulfill you internal data table (gt_alv)
CALL METHOD go_grid->set_table_for_first_display
EXPORTING is_layout = ls_layout
CHANGING it_fieldcatalog = lt_fieldcat
it_outtab = gt_alv.
01-21-2020 4:39 AM
i think that button is not "select all rows" but select "ALV all", so it generated since there are row and column in ALV. if you using NO_HEADER or NO_ROWMARK then that button disappear. but maybe that not what you want...