相关类 CL_GUI_TEXTEDIT
主要方法 CL_GUI_TEXTEDIT->GET_TEXT_AS_R3TABLE
CL_GUI_TEXTEDIT->SET_TEXT_AS_R3TABLE
此类的构造方法和CL_GUI_ALV_GRID 一样也需要放置一个容器
DATA GO_PARENT TYPE REF TO CL_GUI_CUSTOM_CONTAINER .
DATA GO_TEXTEDIT TYPE REF TO CL_GUI_TEXTEDIT .
CONSTANTS: C_LINE_LENGTH TYPE I VALUE 256 .
TYPES: BEGIN OF GTY_TEXT,
LINE(C_LINE_LENGTH) TYPE C,
END OF GTY_TEXT.
DATA GT_TEXT_SAVE TYPE STANDARD TABLE OF GTY_TEXT . "定义内表对长文本保存
CREAT OBJECT GO_PARENT
EXPORTING
CONTAINER_NAME = 'CON2' .
CREATE OBJECT GO_TEXTEDIT
EXPORTING
WORDWRAP_MODE = CL_GUI_TEXTEDIT=>WORDWRAP_AT_FIXED_POSITION
WORDWRAP_TO_LINEBREAK_MODE = CL_GUI_TEXTEDIT=>TRUE
PARENT = GO_PARENT
CALL METHOD GO_TEXTEDIT->GET_TEXT_AS_R3TABLE
IMPORTING
TABLE = GT_TEXTSAVE .
CALL METHOD CL_GUI_CFW=>FLUSH .
释放.
IF GO_TEXTEDIT IS NOT INITIAL.
CALL METHOD GO_TEXTEDIT->FREE .
FREE GO_TEXTEDIT.
ENDIF.
CALL METHOD CL_GUI_CFW=>FLUSH .
来源:CSDN
作者:不堪的我
链接:https://blog.csdn.net/qq_40977705/article/details/104060862