REPORT z_cl_gui_textedit.
 

DATA: ok_code   TYPE sy-ucomm.
 

DATA:
  st_tdline  TYPE tdline,
  it_tdline  TYPE TABLE OF tdline.



DATA:
  container TYPE REF TO cl_gui_custom_container,
  editor    TYPE REF TO cl_gui_textedit.

START-OF-SELECTION.
  CALL SCREEN 9001.
END-OF-SELECTION.


*&---------------------------------------------------------------------*
*&      Module  STATUS_9001  OUTPUT
*&---------------------------------------------------------------------*

MODULE status_9001 OUTPUT.
  SET PF-STATUS 'DEFAULT'.
*  SET TITLEBAR 'xxx'.

ENDMODULE.                 " STATUS_9001  OUTPUT

*&---------------------------------------------------------------------*
*&      Module  USER_COMMAND_9001  INPUT
*&---------------------------------------------------------------------*
MODULE user_command_9001 INPUT.

  CASE ok_code.
    WHEN 'EXEC'.
    WHEN 'SAVE'.
    WHEN 'BACK'.
      LEAVE PROGRAM.
    WHEN 'CANCEL' OR 'EXIT'.
      LEAVE PROGRAM.
    WHEN OTHERS.
  ENDCASE.

ENDMODULE.                 " USER_COMMAND_9001  INPUT

*&---------------------------------------------------------------------*
*&      Module  INITIALIZATION_9001  OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE initialization_9001 OUTPUT.

  IF container IS INITIAL AND editor IS INITIAL.
    CREATE OBJECT: container EXPORTING container_name = 'TEXTEDIT',
                   editor    EXPORTING parent         = container.
  ENDIF.

  st_tdline = 'texto breve'.
  APPEND st_tdline TO it_tdline.

  CALL METHOD editor->set_text_as_stream
    EXPORTING
      text = it_tdline.

ENDMODULE.                 " INITIALIZATION_9001  OUTPUT

Serkan AKKAVAK
Computer Engineer
serkurumsal@yandex.com