REPORT zjw_test01. CONSTANTS: gc_text_line_length TYPE i VALUE 72. TYPES: text_table_type(gc_text_line_length) TYPE c OCCURS 0. DATA: gv_splitter TYPE REF TO cl_gui_easy_splitter_container. DATA: gv_custom_container TYPE REF TO cl_gui_custom_container. DATA: gv_text_editor TYPE REF TO cl_gui_textedit. DATA: lt_text_table TYPE text_table_type, ls_text_table_wa(gc_text_line_length) TYPE c, gv_xthead_updkz TYPE i. CALL SCREEN 100. MODULE splitter_control_vorbereiten OUTPUT. IF gv_splitter IS INITIAL. CREATE OBJECT gv_custom_container EXPORTING container_name = 'SPLITTER_CONTAINER'. CREATE OBJECT gv_splitter EXPORTING parent = gv_custom_container orientation = 1 sash_position = 39. ENDIF. IF gv_text_editor IS INITIAL. CREATE OBJECT gv_text_editor EXPORTING parent = gv_splitter->bottom_right_container * wordwrap_mode = cl_gui_textedit=>wordwrap_at_windowborder wordwrap_to_linebreak_mode = cl_gui_textedit=>false EXCEPTIONS error_cntl_create = 1 error_cntl_init = 2 error_cntl_link = 3 error_dp_create = 4 gui_type_not_supported = 5.
CALL METHOD gv_text_editor->set_readonly_mode
EXPORTING
readonly_mode = cl_gui_textedit=>true. ENDIF. ENDMODULE. " SPLITTER_CONTROL_VORBEREITEN OUTPUT *&---------------------------------------------------------------------* *& Module STATUS_0100 OUTPUT *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* MODULE status_0100 OUTPUT. SET PF-STATUS 'STATUS_0100'. * SET TITLEBAR 'xxx'. ENDMODULE. *&---------------------------------------------------------------------* *& Module EXIT INPUT *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* MODULE exit INPUT. LEAVE TO SCREEN 0. ENDMODULE. *&---------------------------------------------------------------------* *& Module USER_COMMAND_0100 INPUT *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* MODULE user_command_0100 INPUT. DATA t_tdline1 TYPE TABLE OF STANDARD . * Texttabelle aus Control abholen CALL METHOD gv_text_editor->get_text_as_stream IMPORTING text = lt_text_table is_modified = gv_xthead_updkz EXCEPTIONS error_dp = 1 error_cntl_call_method = 2 OTHERS = 3. IF sy-subrc = 0. ENDIF. CALL METHOD gv_text_editor->get_text_as_r3table IMPORTING table = t_tdline1. IF sy-subrc = 0. ENDIF. ENDMODULE.
屏幕
PBO /PAI