05-31-2007 6:58 AM
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
05-31-2007 7:02 AM
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
05-31-2007 7:03 AM
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
05-31-2007 7:30 AM
No, this isn't it. I want to effect only certain lines, not the whole column.