Skip to Content
-2

How to remove the Multiple selection button in Alv Grid ?

Jan 07, 2017 at 09:39 AM

532

avatar image
Former Member

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

image.png (17.0 kB)
10 |10000 characters needed characters left characters exceeded

Using CL_GUI_ALV_GRID, CL_SALV_TABLE, or anything else?

0
Former Member
Sandra Rossi

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

0
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Raymond Giuseppi
Jan 09, 2017 at 06:59 AM
1

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

Share
10 |10000 characters needed characters left characters exceeded
Sandra Rossi Jan 07, 2017 at 10:41 AM
0

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 ).

Show 4 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Sandra,

I have tried the same code ,what happens is entire column is dissappeared..

image1.png

Please see the attachment..

I just want to remove the SELECT ALL icon ..

Regards,

Rohan

image1.png (14.4 kB)
0

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?

0
Former Member
Sandra Rossi

Hi Sandra,

As per my Client request ,I need to remove that icon..

Regards,

Rohan

0

That's not an answer. Why is your client requesting the icon be removed? What is the business requirement behind the request?

2
vamsilakshman pendurti Jan 09, 2017 at 06:52 AM
0

Hi,

Could you please share the screen shot of your ALV Grid Display Output.

Thanks ,

Vamsi.

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Vamsi,

Please find the image attached..image.png

Regards,

Rohan

image.png (17.0 kB)
0
vamsilakshman pendurti Jan 09, 2017 at 06:57 AM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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

0