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 TO MAKE TABLE CONTROL NON EDITABLE

Former Member
0 Kudos

hi all

how to make table control non editable

Thanks & Regards

harsha

9 REPLIES 9

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

In screen painter, you simply make each column of the table control "Output" as opposed to "Input".

Double click on each column, and set the attribute in the dialog.

Regards,

Rich Heilman

0 Kudos

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

0 Kudos

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

0 Kudos

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.

Former Member
0 Kudos

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.

Bhushan_hs
Participant
0 Kudos

Check weather your Program is in change mode.

Former Member
0 Kudos

Hi,

check this link

Thanks

Ashu Singh

0 Kudos

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.

Former Member
0 Kudos

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.