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

Inserting multiple records to ztable from table control

Former Member
0 Likes
1,768

Hi .,

i am new to abap, i have created module pool program with table control for input selection screen creation.

i have created the screen, but the problem is,

i am giving 10 records in the screen , when i click save button it is storing only frist line record not all 10.

how to add multiple records to ztable from table control.please help me

regards,

kavitha

Hi .,

i am new to abap, i have created module pool program with table control for input selection screen creation.

i have created the screen, but the problem is,

i am giving 10 records in the screen , when i click save button it is storing only frist line record not all 10.

how to add multiple records to ztable from table control.please help me

regards,

kavitha

4 REPLIES 4
Read only

former_member188724
Contributor
0 Likes
960

Hi,

Pls check the following demo reports

DEMO_DYNPRO_TABCONT_LOOP

DEMO_DYNPRO_TABCONT_LOOP_AT

DEMO_DYNPRO_TABLE_CONTROL_1

DEMO_DYNPRO_TABLE_CONTROL_2

Hope this helps.

Regards,

K.S

Read only

former_member202818
Active Contributor
0 Likes
960

Hi Kavitha,

PBO

loop at itab into wa with control tbc.

endloop.

PAI

loop at itab.

module modify.

endloop.

module save_data.

********************

module modify.

modify itab from wa index tbc-current_line.

if sy-subrc <> 0.

append wa to itab.

endif.

endmodule.

module save_data.

if ok_code = 'SAVE'.

modify ztable from table itab.

endif.

endmodule.

and for more refer...

Regards

Sreekanth

Read only

0 Likes
960

hi Sreekanth ,

when i try to save multiple records, empty line also getting added into ztable .

how to avoid that one ?

regards,

S.kavitha

Read only

0 Likes
960

do this modification

modify itab from wa index tbc-current_line.

if sy-subrc <> 0 and wa is not initial.

append wa to itab.

endif.

or in PBO..

describe table itab lines tbc-lines.