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

Making all fields editable in Table Control

Former Member
0 Likes
1,451

Hello,

I have created a Table Conrol with 2 fields on it. However when the screen is displayed only the first row is "Editable".

Can you please let me know how can I make all the fields that are on the screen can be "Editable"?

The Flow Logic is:

process before output.
 module status_0615.

  loop at t_data into w_data with control tc_data.
    module read_data.
  endloop.

*-------------------------------------------------------------*
process after input.
 module exit_0615 at exit-command.

   loop at t_data.
    module modify_data.
   endloop.

 module user_command_0615.

*-------------------------------------------------------------*
module read_data output.

    loop at screen.     
      screen-input = 1.
        modify screen.
    endloop.

endmodule.                 "modify_data output
*-------------------------------------------------------------*
module modify_data input.

 w_data-docno = doc_no.
 modify t_data from w_data transporting doc_no
    where qmnum = w_data-qmnum
      and matnr = w_data-matnr.

endmodule.                 "read_data input
*-------------------------------------------------------------*

I greatly appreciate your help.

PS: t_data has only 1 entry in it. Is it the reason?

Thanks.

1 ACCEPTED SOLUTION
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,091

Remove this tattement


    loop at screen.     
      screen-input = 1.
        modify screen.
    endloop.

7 REPLIES 7
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,092

Remove this tattement


    loop at screen.     
      screen-input = 1.
        modify screen.
    endloop.

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,091

PS: t_data has only 1 entry in it. Is it the reason?

Yes, that is correct. After adding your selected records to the internal table, add blank lines to it as well. Like 20 or so.

clear wa.
do 20 times.
    append wa to itab.
enddo.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
1,091

I have added enough lines to the internal table to fill the screen in the past, but this has always seemed awkward to me. You have to remove the blank lines for actual processing.

I recall seeing a more ABAPer friendly solution in the forum within the past year or so. If you search the forum or use Googel, you should be able to find it.

Rob

Read only

0 Likes
1,091

Thanks all for the kind responses.

Keshav,

I have already tried you suggestion. It didn't work. Thanks though.

Rich,

Your logic did work.

Rob,

Yes. I feel the same. I will try to search the forum as you mentioned. Is there a "Wiki" or something you know that provide more insight on this?

Thanks again.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,091

set the 'lines' property of table control to 0.

Read only

0 Likes
1,091
set the 'lines' property of table control to 0.

Keshav,

Can you please elaborate it little bit? I'm still a learner in Dialog Programming.

Where can I set this - Is it in the "Elelement List" or "Layout"?

Thanks much.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,091

Please check program DEMO_DYNPRO_TABLE_CONTROL_1

Did you mark the input an output field check box(screen attributes) and inpput = possible

for all the fields in table control

To know about LINES

You can read this link:[Table Controls in ABAP Programs|http://help.sap.com/saphelp_nw04/helpdata/EN/9f/dbac9f35c111d1829f0000e829fbfe/content.htm]

Edited by: Keshav.T on Jan 15, 2010 9:29 PM