实战SAP:【总结】文本编辑器

DATA : ok_code TYPE sy-ucomm,

save_ok TYPE sy-ucomm.

DATA : init.

DATA : container TYPE REF TO cl_gui_custom_container.

DATA : editor TYPE REF TO cl_gui_textedit.

DATA : m1(256) TYPE c OCCURS 0,

line(256) TYPE c.

line = 'Please Input :'.

append LINE to m1.

call SCREEN 100.

REFRESH m1.

CALL METHOD editor->get_text_as_r3table IMPORTING table = m1.

LOOP AT m1 INTO line.

WRITE : / line.

ENDLOOP.

MODULE user_command_0100 INPUT.

save_ok = ok_code.

CLEAR ok_code.

case save_ok.

when 'EXIT'.

LEAVE TO SCREEN 0.

ENDCASE.

ENDMODULE.

MODULE status_0100 OUTPUT.

set PF-STATUS 'STATUS1'.

IF init IS INITIAL.

init = 'X'.

CREATE OBJECT : container EXPORTING container_name = 'P1'.

CREATE OBJECT editor

EXPORTING

parent = container

wordwrap_mode = cl_gui_textedit=>wordwrap_at_fixed_position

wordwrap_position = 256

wordwrap_to_linebreak_mode = cl_gui_textedit=>true.

ENDIF.

CALL METHOD editor->set_text_as_r3table

EXPORTING

table = m1.

ENDMODULE.

实战SAP:【总结】文本编辑器_第1张图片

 

你可能感兴趣的:(SAP,p2p,linq,wpf)