2010 Jul 16 11:17 AM
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
2010 Jul 16 2:32 PM
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?
2010 Jul 16 2:32 PM
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?
2010 Jul 17 5:42 AM
Hi Frnds....
My problem has been resolved by giving screen Input 0.
cols-screen-input = '0'.
Thanks,
Shree
2010 Jul 16 2:46 PM
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.
Edited by: Raj on Jul 16, 2010 7:16 PM