09-26-2006 9:09 AM
09-26-2006 9:14 AM
HI,
ya there is a field in catalog,need to set it
fieldcat-no_out = 'X'
Try this.
09-26-2006 9:26 AM
I didn't mean to make an entire column invisible, I want to make certain cells of a specific column invisible.
09-26-2006 9:57 AM
Hi Karl
You cannot make a particular column invisible,however you can make it input enabled or input disabled by dynamically adjusting the style.The code is as below :
1. add the following data to your main internal table
TYPES: celltab TYPE lvc_t_styl. "Layout style
2.FORM zf_fill_celltab USING p_mode TYPE any
CHANGING pt_celltab TYPE lvc_t_styl.
DATA: ls_celltab TYPE lvc_s_styl,
ls_mode TYPE raw4.
This forms sets the style of columns editable or non-editale
IF p_mode EQ 'RW'.
ls_mode = cl_gui_alv_grid=>mc_style_enabled.
ELSE. "p_mode eq 'RO'
ls_mode = cl_gui_alv_grid=>mc_style_disabled.
ENDIF.
Required
ls_celltab-fieldname = 'ANLN1'. "Main Asset Number
ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
INSERT ls_celltab INTO TABLE pt_celltab.
ls_celltab-fieldname = 'ANLN2'. "Asset Subnumber
ls_celltab-style = cl_gui_alv_grid=>mc_style_enabled.
INSERT ls_celltab INTO TABLE pt_celltab.
endform.