‎2009 Mar 13 10:37 AM
hi,
i hav table control in which i have four fields f1 f2 f3 f4 .f1 and f2 are primary key fields.so according to my requirement i made these two columns input disabled so that the primary key fields shuld not be changed.now the issue whenever i insert an initial line new row is added to table control so that v can add new record but the two fields f1 and f2 columns are input disabled for me..........so i need it to be input enabled whenever i add an initial line.
cna anyone plz help me in this issue...............
‎2009 Mar 13 11:50 AM
Hi,
If you need to add new records through a table control first you will have to enable to columns. Statically ou have set them as input disabled. Assign same group1 to both the key fields. Now suppose you click on a button say New Entry on the screen and it has fctcode as NEW try something like this
case sy-ucomm.
when 'NEW'.
loop at screen.
if screen-group1 = 'ABC'
screen-input = 1.
modify screen.
endif.
endloop.
endcase.
Here we assume that the group1 is assigned the value ABC.
Hope this solves your query.
Regards,
Sachin
‎2009 Mar 14 12:59 PM
‎2009 Mar 14 1:03 PM
Initially by default make those two columns display only by using the above code (input = 0.)
When you click the new line button , you can loop at the screen again and make these colums input enabled (input = 1 ) along with the non key fields.
Mathews.