Hello folks,
I tried to read the text from an custom container, but the text the text won't appear (gs_stamm-text ist empty).
Definition
data: g_editor type REF TO cl_gui_textedit,
g_editor_container type REF TO cl_gui_custom_container.
PBO
if g_editor is initial.
g_repid = sy-repid.
CREATE OBJECT g_editor_container
EXPORTING
container_name = 'TEXTFELD'
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5.
if sy-subrc ne 0.
leave program.
endif.
CREATE OBJECT g_editor
EXPORTING
parent = g_editor_container
wordwrap_mode = cl_gui_textedit=>wordwrap_at_fixed_position
wordwrap_to_linebreak_mode = cl_gui_textedit=>true.
CALL METHOD G_EDITOR->SET_TOOLBAR_MODE
EXPORTING
TOOLBAR_MODE = 0
EXCEPTIONS
ERROR_CNTL_CALL_METHOD = 1
INVALID_PARAMETER = 2
others = 3
.
if sy-subrc ne 0.
CALL FUNCTION 'popup_to_inform'
EXPORTING
titel = g_repid
txt2 = space
txt1 = text-001.
ENDIF.
ENDIF.
PAI:
CALL METHOD G_EDITOR->GET_TEXTSTREAM
importing
text = gs_stamm-text "gs_stamm-text is type string
EXCEPTIONS
ERROR_CNTL_CALL_METHOD = 1
not_supported_by_gui = 2
others = 3.
if sy-subrc ne 0.
CALL FUNCTION 'popup_to_inform'
EXPORTING
title = g_repid
txt2 = space
txt1 = text-004.
endif.
Thank you in advance for your help.
Thorsten