‎2007 Jul 10 11:20 AM
I have a tc where it is validating the column zmsd_invtype_TC-out_type from db.
I want that column of tc to be grayed out initially and when pressed append or insert button, it should be ready for input. but rest of the columns should be enabled.
thanks,
Abhijeet.
‎2007 Jul 10 11:27 AM
‎2007 Jul 10 11:28 AM
Hi,
Set it as display only field in screen painter.And in PAI ,set one flag as 1 when u press insert or append button.After that in PBO ,use tc-cols itab to modify the that field.attribute.
Eg.
PAI..
WHEN 'APPEND'.
fg_outyp = '1'
in PBO module,
DATA w_cols LIKE LINE OF tc-cols.
LOOP AT tc-cols INTO w_cols WHERE screen-name = 'X_T001L-WERKS'.
if fg_outyp = '0'.
w_cols-screen-input = '0'.
elseif fg_outyp = '1'.
w_cols-screen-input = '0'.
Endif.
MODIFY tc-cols FROM w_cols INDEX sy-tabix.
ENDLOOP.
‎2007 Jul 10 12:03 PM
hi
in pbo itself u write code to disable those fields.
in pai write code to enable it and use it.
reward if useful.
‎2007 Jul 10 3:12 PM
Hi Abhijeet ,
this is link with screen shot of table control creation
<a href="http://">http://www.sapdevelopment.co.uk/dialog/tabcontrol/tc_basic.htm</a>
<b>Highlight individual table control field</b>
The example below sets the EBELN field on the 3rd row of the table control to not be an input field. This is a fairly simple process which involves firstly calculating which row of the internal table is displayed at the top of the table control. From this you can work out which itab row is on the 3rd row and set its attributes using the LOOP AT SCREEN command.
Based on the example table control the ABAP code for this will be as follows, resulting in a modified version of the PBO MODULE 'populate_screen'.
MODULE populate_screen OUTPUT.
DATA: ld_line TYPE i.
* Set which line of itab is at the top of the table control
IF sy-stepl = 1.
tc100-lines =
tc100-top_line + sy-loopc - 1.
ENDIF.
* move fields from work area to scrren fields
MOVE-CORRESPONDING wa_ekko TO ztc_ekko.
ld_line = sy-stepl + tc100-top_line - 1.
* Changes individual field attributes of table control,
* Sets EBELN field on 3rd row of TC to not be an input field!
LOOP AT SCREEN.
IF ld_line EQ 3.
IF screen-name EQ 'ZTC_EKKO-EBELN'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
ENDMODULE. " populate_screen OUTPUT
reward points if it is usefull .....
Girish