Application Development 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: 

How can I hide the marker button in an ALV GRID line?

jrgkraus
Active Contributor
0 Kudos

Hi all,

I am switching an old program from ALV LIST to ALV GRID. In the old list, I put a checkbox on each line to abilify the user to mark some lines. However, there are some lines that I don't want the user to select. In the list, I set the field for the box name to "*" (asterisk) and in the list, the checkbox is not input enabled.

Now in the grid, this does not function any more. all lines are markable. How can I deactivate the marker function for some lines?

Greetings

Jörg

3 REPLIES 3

Former Member
0 Kudos

chk my blog if it can help you

/people/community.user/blog/2007/01/10/displaychange-mode-of-editable-fields-in-alv-using-function-modules-but-not-custom-containers

Former Member
0 Kudos

Hi,

use the below snippet in your code

DATA: ls_celltab TYPE lvc_s_styl.

REFRESH pt_celltab.

IF p_mode EQ text-103.

*§2a.Use attribute CL_GUI_ALV_GRID=>MC_STYLE_ENABLED to set a cell

  • to status "editable".

ls_celltab-fieldname = c_character1.

ls_celltab-style = cl_gui_alv_grid=>mc_style_enabled.

ls_celltab-style2 = cl_gui_alv_grid=>mc_style_f4.

INSERT ls_celltab INTO TABLE pt_celltab.

ls_celltab-fieldname = c_character2.

ls_celltab-style = cl_gui_alv_grid=>mc_style_enabled.

ls_celltab-style2 = cl_gui_alv_grid=>mc_style_f4.

INSERT ls_celltab INTO TABLE pt_celltab.

ls_celltab-fieldname = c_character3.

ls_celltab-style = cl_gui_alv_grid=>mc_style_enabled.

ls_celltab-style2 = cl_gui_alv_grid=>mc_style_f4.

INSERT ls_celltab INTO TABLE pt_celltab.

ls_celltab-fieldname = text-107.

ls_celltab-style = cl_gui_alv_grid=>mc_style_enabled.

ls_celltab-style2 = cl_gui_alv_grid=>mc_style_f4.

INSERT ls_celltab INTO TABLE pt_celltab.

ls_celltab-fieldname = c_selectionid.

ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.

INSERT ls_celltab INTO TABLE pt_celltab.

Regards

0 Kudos

No, this isn't it. I want to effect only certain lines, not the whole column.