‎2008 Oct 01 2:24 PM
Hello,
I am currently having an issue with the vertical scroll control in my classic dynpro table. When I scroll down it will scroll past the first record and then freeze. I cannot scroll back up to the first record. If I try to scroll down it jumps many records and then will not let me scroll back. I have compared the coding from this screen to one that works and cannot find any differences. Is there somewhere else I should be looking? Has anyone else experienced this issue?
Thanks,
Jereme
‎2008 Oct 02 1:41 AM
Hi Jereme Ebaugh,
Clear SY-UCOMM after it has processed.
Try this.
Regards,
R.Nagarajan.
‎2008 Oct 02 4:21 AM
Check out this example program.
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.
It has the following flow logic:
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.
Regards,
Midhun Abraham
Edited by: Midhun Abraham on Oct 2, 2008 5:23 AM
‎2008 Oct 02 2:08 PM
Hello Nagarajan Ramamoorthy!
I currently clear Sy-Ucomm at the end of the user command module in the PAI Section. Should I clear it somewhere else?
Thanks,
Jereme