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

Input enable based on condition in table control

Former Member
0 Likes
485

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...............

3 REPLIES 3
Read only

Former Member
0 Likes
461

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

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
461

Hi,

Kindly refer the below link:

Hope this helps you.

Regards,

Tarun

Read only

Former Member
0 Likes
461

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.