Application Development and Automation 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: 
Read only

Table Control Columns Disable

Former Member
0 Likes
699

Hi All,

I have a table control. I need to disable some of the fields in the table control..means it should be visible but not enable..How to do it?

3 REPLIES 3
Read only

Former Member
0 Likes
603

Be specific with your requirement. Can you just elaborate your question

Read only

Former Member
0 Likes
603

There are two ways of making a screen element invisible.

1. In your loop at screen, check out the screen-name for your table control and make screen-invisible = 1 apart from screen-input = 0.

2. Go to transaction SHD0. Using Screen variant you can make any element in a screen visible or invisible.

You have a call function RS_HDSYS_SET_SC_VARIANT to which you have to pass ur screen variant name, screen number, program name and overwrite option to 'X'.

After this Fm, call your PF-Status. This is will work fine.

also,

To disable/enable fields of a column we will use the field SCREEN-INPUT of the

structure CXTAB_COLUMN and set its value to 0 or 1.

e.g. To disable input at column 3 of the table control .

DATA col LIKE LINE OF tab_con-COLS.

READ TABLE tab_con-COLS INTO col INDEX 3.

col-SCREEN-INPUT = 0.

MODIFY tab_con-COLS FROM col INDEX 3. d) ABAP DECLARATION :

Regards

Read only

Former Member
0 Likes
603

You meant to say,,, only display and not abe to edit. then we have option in the screen field attributes called Output only. Just select that one.

Double click on the screen field for which you need to put it in display mode and here go for Program tab and select the check box Output only.