Ja, hab ich drin.benutzt Du denn im Dynpro 'LOOP AT itab WITH CONTROL tc CURSOR tc-current_line.'?
Nutze ich nicht. Ich habe keine Logik zum Blättern über F-Codes implementiert. Das Scrollen über den Scrollbalken reicht bei mir vollkommen aus (vermutete Anzahl Datensätze).Weiterhin wirst Du möglicherweise noch mit 'GET CURSOR' ermitteln müssen, in welchen TC Dein Cursor gerade steht, um das Scrollen (Du verwendest doch die FCodes P++, P+, P- und P--, oder?) für den aktuellen TC zu triggern.
Code: Alles auswählen.
*----------------------------------------------------------------------*
PROCESS BEFORE OUTPUT.
*----------------------------------------------------------------------*
MODULE clear_okcode.
MODULE status_0100.
*
CALL SUBSCREEN sub01 INCLUDING sy-repid '0120'.
CALL SUBSCREEN sub02 INCLUDING sy-repid '0140'.
CALL SUBSCREEN sub03 INCLUDING sy-repid '0160'.
*----------------------------------------------------------------------*
PROCESS AFTER INPUT.
*----------------------------------------------------------------------*
MODULE exit_0100 AT EXIT-COMMAND.
CALL SUBSCREEN sub01.
CALL SUBSCREEN sub02.
CALL SUBSCREEN sub03.
MODULE user_command_0100.
Code: Alles auswählen.
MODULE clear_okcode OUTPUT.
CLEAR okcode.
ENDMODULE. " clear_okcode OUTPUT
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STANDARD'.
ENDMODULE. " STATUS_0100 OUTPUT
Code: Alles auswählen.
MODULE exit_0100 INPUT.
CASE okcode.
WHEN co_exit OR co_back.
SET SCREEN 0.
WHEN OTHERS.
ENDCASE.
CLEAR okcode.
ENDMODULE. " exit_0100 INPUT
MODULE user_command_0100 INPUT.
* noch ungeklärt
CLEAR okcode.
ENDMODULE. " USER_COMMAND_0100 INPUT
Code: Alles auswählen.
*----------------------------------------------------------------------*
PROCESS BEFORE OUTPUT.
*----------------------------------------------------------------------*
MODULE prepare_tablecontrol_0120.
LOOP AT gt_keym INTO wa_gt_keym
WITH CONTROL tc_stedmd CURSOR tc_stedmd-current_line.
MODULE fill_tc_0120.
ENDLOOP.
*----------------------------------------------------------------------*
PROCESS AFTER INPUT.
*----------------------------------------------------------------------*
LOOP AT gt_keym.
FIELD zzstedmd-lfdnr:
* Eingaben vom TC übernehmen
MODULE get_changes_from_tc.
FIELD mark:
* Kopieren eines markierten Eintrags
MODULE copy_tc_entry ON INPUT,
* Löschen eines markierten Eintrage
MODULE delete_tc_entry ON INPUT,
* Stufeneditor starten
MODULE start_sted_for_marked_entry ON INPUT,
* Ergebnisse anzeigen
MODULE show_results_for_marked_entry ON INPUT.
FIELD zzstedmd-lfdnr MODULE check_lfdnr.
ENDLOOP.
MODULE user_command_0120.
Code: Alles auswählen.
MODULE prepare_tablecontrol_0120 OUTPUT.
REFRESH CONTROL 'TC_STEDMD' FROM SCREEN sy-dynnr.
DESCRIBE TABLE gt_keym LINES tc_stedmd-lines.
ENDMODULE. " prepare_tablecontrol_0120 OUTPUT
MODULE fill_tc_0120 OUTPUT.
* Daten aus den Attributen des Exemplars lesen
zzstedmd = wa_gt_keym-ref_detail->get_attributes_for_tc( ).
* prüfen, ob Arbeitsplatz in Fertigungsgrenzen liegt
IF wa_gt_keym-ref_detail->check_arbpl( zzstedmd-arbpl ) = co_true.
PERFORM icon_create USING co_green_light
text-100
CHANGING gv_tc_icon.
ELSE.
PERFORM icon_create USING co_red_light
text-110
CHANGING gv_tc_icon.
ENDIF.
ENDMODULE. " fill_tc_0120 OUTPUT
Code: Alles auswählen.
MODULE get_changes_from_tc INPUT.
IF NOT wa_gt_keym-ref_detail IS INITIAL.
* Änderungen in Attribute übernehmen
CALL METHOD wa_gt_keym-ref_detail->set_attributes_from_tc
EXPORTING
is_zzstedmd = zzstedmd.
* Änderungen in itab übernehmen
PERFORM set_curr_attributes_in_keytab USING tc_stedmd-current_line
CHANGING gt_keym
gv_rc.
ENDIF.
ENDMODULE. " get_changes_from_TC INPUT
MODULE copy_tc_entry INPUT.
CHECK okcode = co_copy.
PERFORM copy_selected_entry USING tc_stedmd-current_line
CHANGING gt_keym
gv_rc.
CLEAR okcode.
ENDMODULE. " copy_tc_entry INPUT
MODULE delete_tc_entry INPUT.
CHECK okcode = co_delete.
PERFORM delete_selected_entry USING tc_stedmd-current_line
CHANGING gt_keym
gt_keym_delete
gv_rc.
CLEAR okcode.
ENDMODULE. " delete_tc_entry INPUT
MODULE start_sted_for_marked_entry INPUT.
CHECK okcode = co_calculate.
PERFORM calc_selected_entry_with_sted USING tc_stedmd-current_line
CHANGING gt_keym
gv_rc.
CLEAR okcode.
ENDMODULE. " start_sted_for_marked_entry INPUT
MODULE show_results_for_marked_entry INPUT.
*...
ENDMODULE. " show_results_for_marked_entry INPUT
MODULE check_lfdnr INPUT.
PERFORM check_lfd_not_initial USING tc_stedmd-current_line
gt_keym.
ENDMODULE. " check_lfdnr INPUT
MODULE user_command_0120 INPUT.
CASE okcode.
WHEN co_sortup OR co_sortdown.
* Sortieren derzeit ausschließlich nach Methode
PERFORM sort_table_keym USING okcode.
CLEAR okcode.
WHEN co_copy OR co_delete OR co_calculate OR co_result.
* -> module copy_tc_entry
* -> module delete_tc_entry
* -> module start_sted_for_marked_entry
* -> module show_results_for_marked_entry
* Falls okcode hier gefüllt ist fehlt auf dem TC die Markierung.
MESSAGE w011.
WHEN OTHERS.
ENDCASE.
ENDMODULE. " USER_COMMAND_0120 INPUT
Code: Alles auswählen.
MODULE prepare_tablecontrol_0120 OUTPUT.
* REFRESH CONTROL 'TC_STEDMD' FROM SCREEN sy-dynnr.
DESCRIBE TABLE gt_keym LINES tc_stedmd-lines.
ENDMODULE. " prepare_tablecontrol_0120 OUTPUT