‎2007 May 26 7:11 AM
HI all
please give me the code to move the records from internal table itsb to a table control. for me it is sendding only 14 records from internal table to the table control( that 14 indicates the visible lines in table control) after that it is geting dumped. Please help
‎2007 May 26 7:16 AM
PROCESS PBO
MODULE SET_ATTR_TC.
LOOP AT ITAB WITH .....
ENDLOOP.
MODULE SET_ATTR_TC.
<b>DESCRIBE TABLE ITAB LINES SY-TABIX.</b>
<b><TABLE CONTROL>-LINES = SY-TABIX.</b>
ENDMODULE.
‎2007 May 26 7:16 AM
PROCESS PBO
MODULE SET_ATTR_TC.
LOOP AT ITAB WITH .....
ENDLOOP.
MODULE SET_ATTR_TC.
<b>DESCRIBE TABLE ITAB LINES SY-TABIX.</b>
<b><TABLE CONTROL>-LINES = SY-TABIX.</b>
ENDMODULE.
‎2007 May 26 7:28 AM
Refer the following code:
report demo_dynpro_tabcont_loop.
controls flights type tableview using screen 100.
data: ok_code type sy-ucomm,
save_ok type sy-ucomm.
data: itab type table of demo_conn,
fill type i.
tables demo_conn.
data: lines type i,
limit type i.
select * from spfli into corresponding fields of table itab.
call screen 100.
module status_0100 output.
set pf-status 'SCREEN_100'.
describe table itab lines fill.
flights-lines = fill.
endmodule.
module fill_table_control output.
read table itab into demo_conn index flights-current_line.
endmodule.
module cancel input.
leave program.
endmodule.
module read_table_control input.
lines = sy-loopc.
modify itab from demo_conn index flights-current_line.
endmodule.
module user_command_0100 input.
save_ok = ok_code.
clear ok_code.
case save_ok.
when 'NEXT_LINE'.
flights-top_line = flights-top_line + 1.
limit = fill - lines + 1.
if flights-top_line > limit.
flights-top_line = limit.
endif.
when 'PREV_LINE'.
flights-top_line = flights-top_line - 1.
if flights-top_line < 0.
flights-top_line = 0.
endif.
when 'NEXT_PAGE'.
flights-top_line = flights-top_line + lines.
limit = fill - lines + 1.
if flights-top_line > limit.
flights-top_line = limit.
endif.
when 'PREV_PAGE'.
flights-top_line = flights-top_line - lines.
if flights-top_line < 0.
flights-top_line = 0.
endif.
when 'LAST_PAGE'.
flights-top_line = fill - lines + 1.
when 'FIRST_PAGE'.
flights-top_line = 0.
endcase.
endmodule.<b>Scree 100</b>
process before output.
module status_0100.
loop with control flights.
module fill_table_control.
endloop.
process after input.
module cancel at exit-command.
loop with control flights.
module read_table_control.
endloop.
module user_command_0100.