Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SET_TABLE_FOR_FIRST_DISPLAY

Former Member
0 Likes
1,012

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

8 REPLIES 8
Read only

Former Member
0 Likes
903

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

Read only

0 Likes
903

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

Read only

0 Likes
903

Note the "p_tb_exclude" references above.

Don't forget points for helpful answers.

Read only

0 Likes
903

I just tried that solution, John, it doesn't work. The SELECT ALL appears in the left corner of the ALV control, not the toolbar.

Regards,

Rich Heilman

Read only

0 Likes
903

Oops... mis-read the question.

Read only

0 Likes
903

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

Read only

0 Likes
903

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

Read only

Former Member
0 Likes
903

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.