2014 Oct 07 11:58 AM
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
2014 Oct 07 12:01 PM
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
2014 Oct 07 12:19 PM
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.
Regards
Sreekanth
2014 Oct 08 6:27 AM
hi Sreekanth ,
when i try to save multiple records, empty line also getting added into ztable .
how to avoid that one ?
regards,
S.kavitha
2014 Oct 08 8:09 AM
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.