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: 

Table Control Fields Disable.

Former Member
0 Kudos
546

Hi.....

I have create a Table control with 3 fields. i want to disable all fields on condition basis.

it have to do disable with this method...

LOOP AT tc_1001-cols INTO cols.

IF ( cols-screen-name = 'I_FINAL1-SR_NO' OR

cols-screen-name = 'I_FINAL1-ZACTVT' OR

cols-screen-name = 'I_FINAL1-ZEXPNS' ).

cols-screen-active = '0'. MODIFY tc_1001-cols FROM cols INDEX sy-tabix.

ENDIF.

ENDLOOP.

this method have to do disabled the field but values of this field is not coming.....

Regards,

Shree

1 ACCEPTED SOLUTION

Former Member
0 Kudos
85

Values? You're losing the data values...that happens because of the ACTIVE = 0, if I remember correctly. Why not set INPUT = 0, to allow values to display, but not to be edited, instead of ACTIVE = 0?

3 REPLIES 3

Former Member
0 Kudos
86

Values? You're losing the data values...that happens because of the ACTIVE = 0, if I remember correctly. Why not set INPUT = 0, to allow values to display, but not to be edited, instead of ACTIVE = 0?

0 Kudos
85

Hi Frnds....

My problem has been resolved by giving screen Input 0.

cols-screen-input = '0'.

Thanks,

Shree

Former Member
0 Kudos
85

Hi Shri,

In the PBO of screen where you are using Table control,

Define a module. In that module, loop at <table_ctrl>-cols. and modify the attributes of column you need.

here tab_tkreq is table control.

DATA : wa LIKE LINE OF tab_tkreq-cols .

LOOP AT tab_tkreq-cols INTO wa .

IF wa-screen-name = 'Scrren1'.

wa-invisible = 1 .

ENDIF.

MODIFY tab_tkreq-cols FROM wa .

ENDLOOP.

Check the thread : [;

Edited by: Raj on Jul 16, 2010 7:16 PM