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

Insert multiple Rows at a time in Table control.

Former Member
0 Likes
2,364

I am Doing Dialog Programming,

In Table control I have to insert some values, by clicking on INSERT Button, so now its allowing only single rows to edit..

But as per my requirenments "I want atleast 10 Rows should be editable,at a time when user clicks on INSERT."

Plz have eye on it.

your suggestions are always welcome.

Regards

Vivek

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,161

Hi,

Try this


if sy-ucomm = 'INSERT'.
  add 10 to tabc-lines.    "tabc is the table control.
endif.

Thanks,

Anmol.

4 REPLIES 4
Read only

Former Member
0 Likes
1,161

Hi

in PBO
module insert.
loop at itab.

endloop.

in program

module insert.
if ok_code = 'INS'.
DESCRIBE TABLE ITAB LINES TC-LINES.
TC-LINES = TC-LINES + 10.  " This will insert 10 lines in Table control
ENDIF.  "or
do 10 times.
insert initial line into itab. " For More info Take F1 help on this Key word
enddo.
endmodule.

Cheerz

Ram

Read only

Former Member
0 Likes
1,161

hi vivek,

please decleare a field symbol to your table control for example:

FIELD-SYMBOLS: <tc> TYPE cxtab_control.

ASSIGN tc TO <tc>.

the field-symbol <tc> has now the field 'LINES'. here you can declare how many rows you wanna show.

You should at the rows to your internal table too.

you can see which fields you can adjust in the structure SCXTAB_CONTROL.

you can set the field as input field with loop at screen.

i hope it will help you.

cheers

jens

Read only

Former Member
0 Likes
1,162

Hi,

Try this


if sy-ucomm = 'INSERT'.
  add 10 to tabc-lines.    "tabc is the table control.
endif.

Thanks,

Anmol.

Read only

0 Likes
1,161

Thanks to all,

those who replied.

I got solution,

I have rewarded Point.

Post Closed.

Cheers

Vivek