12-13-2006 2:25 PM
hi all
how to make table control non editable
Thanks & Regards
harsha
12-13-2006 2:28 PM
12-13-2006 2:34 PM
Hi,
As Rich saID , GO TO ATTRIBUTES OF THE FIELDS OF TABLE CONTROL AND CHANGE EACH OF THEM TO OUTPUT ONLY.
OR ELSE , YOU CAN ADD A CODE IN THE PBO,
TABLE CONTROL IS TCONTROL
DATA W_TCONTROL LIKE LINE OF TCONTROL-COLS.
Loop at TCONTROL-cols into w_TCONTROL..
w_TCONTROL-INPUT = '0'.
Modify TCONTROL-cols from w_TCONTROL.
ENDLOOP.
THANKS
12-13-2006 2:53 PM
hi venki,
thanks for ur reply
if i go to properties of each field in table control all properties are disable,so i can't set properties
i also tried with ur code..
i am facing problem with declarations..
can tell me where i can declare
and it is showing that w_tcontrol-input not defined..
can u clarify..
Thanks & Regards
harsha
08-21-2009 7:28 AM
Hi,
Try this code in the PBO inside the module in the LOOP...ENDLOOP.
IF SY-TCODE EQ 'ZEMPLDISPLAY'.
LOOP AT SCREEN.
if screen-name eq 'column1' or screen-name eq 'column2'. "Give the names of the columns in the table control
SCREEN-INPUT = '0'.
MODIFY SCREEN.
endif.
ENDLOOP.
ENDIF.
Or you can go the Layout of the table control in Change mode and for every column's attributes, make it 'Output' only field. Check 'Output only' field.
12-13-2006 2:44 PM
goto SE51 and specify the program name...Go to the screen & place cursor on the table control fields...Go to the property of the field and untick the checkbox INPUT.
08-21-2009 7:10 AM
08-21-2009 1:24 PM
08-21-2009 1:27 PM
no need of any code.
in table control layout -> be in change mode -> double click on the table field (not on the field header in table control). you geta popup for attributes. here make it as output only.
07-01-2012 11:26 AM
Hi, the answer from Venky is almost correct, it was necessary to add the "screen" prefix
DATA: W_TCONTROL LIKE LINE OF TCONTROL-COLS.
Loop at TCONTROL-cols into w_TCONTROL..
w_TCONTROL-SCREEN-INPUT = '0'.
Modify TCONTROL-cols from w_TCONTROL.
ENDLOOP.