2005 Aug 28 3:11 PM
Hey guys,
Could you pls tell me how to make one particular column editable and non-editable one.
i have done before..but could not recall how i did..
could you pls..guide..
ambichan
2005 Aug 28 3:34 PM
You can do this statically, in screen painter by double clicking the field of table control, uncheck the "Input Field" attribute.
You can do this dynamically at runtime, by modifying the table control.
* Here you are looping at the columns of table control
* itself, not the internal table which is used in the
* table control.
* This table has a structure, here we are looping at
* the columns(cols) of the table control.
* You can set them as INPUT = 1 or INPUT = 0.
loop at i_pidetcon-cols into cols where index gt 0.
if cols-screen-group1 = 'GP1'
and cols-screen-input = '0'.
cols-screen-input = '1'.
elseif cols-screen-group1 = 'GP1'
and cols-screen-input = '1'.
cols-screen-input = '0'.
endif.
modify i_pidetcon-cols from cols index sy-tabix.
endloop.
Regards,
Rich Heilman
2005 Aug 28 3:18 PM
2005 Aug 28 3:30 PM
Hi,
This code hides a column in a table control.
FORM SUPRESS_TAB_CONTROL using sprfield.
data: fields type CXTAB_COLUMN.
loop at screen_0300-cols into fields.
if fields-screen-name = sprfield.
fields-invisible = 1.
MODIFY screen_0300-COLS FROM fields.
endif.
endloop.
ENDFORM.
Svetlin
2005 Aug 28 3:34 PM
You can do this statically, in screen painter by double clicking the field of table control, uncheck the "Input Field" attribute.
You can do this dynamically at runtime, by modifying the table control.
* Here you are looping at the columns of table control
* itself, not the internal table which is used in the
* table control.
* This table has a structure, here we are looping at
* the columns(cols) of the table control.
* You can set them as INPUT = 1 or INPUT = 0.
loop at i_pidetcon-cols into cols where index gt 0.
if cols-screen-group1 = 'GP1'
and cols-screen-input = '0'.
cols-screen-input = '1'.
elseif cols-screen-group1 = 'GP1'
and cols-screen-input = '1'.
cols-screen-input = '0'.
endif.
modify i_pidetcon-cols from cols index sy-tabix.
endloop.
Regards,
Rich Heilman
2005 Aug 28 3:47 PM
Hay Rich,
Thanks for your reply..it worked out.
You peoples reply really great.Thanks.
ambichan
2005 Aug 28 3:49 PM
2005 Aug 28 3:46 PM
Hi, you can adjust the column attribute of table control in the PBO. like following:
CONTROLS: TABCTRL TYPE TABLEVIEW USING SCREEN XXXX.
DATA: COLUMN TYPE CXTAB_COLUMN.
LOOP AT TABCTRL-COLS INTO COLUMN.
set the column name here which you want to populate
it's attribute
if column-screen-name = 'XXXX'.
COLUMN-SCREEN-input = (space)/('X').
MODIFY TABCTRL-COLS FROM COLUMN.
endif.
ENDLOOP.
Hope it will be helpful
thanks a lot