Skip to Content
0
Former Member
Jan 04, 2006 at 06:15 PM

Can't catch the text of a text editor since first time

247 Views

I have the following code. In the screen I have a text Editor, a button and a textbox I want that the text in the text editor appear in the textbox when I push the botton, but only when I click the button a second time it appers the actual text. The first time I click the button it's blank the text box and the first time I click the button when the editor has text before it appears the original text and not the actual until the second time I push the button.

Do you know what's happening?

Thanx in advance

&----


*& Report ZPRUEBAPANT

*&

&----


*&

*&

&----


REPORT zpruebapant MESSAGE-ID 02.

DATA nombre LIKE pa0001-ename.

DATA container TYPE REF TO cl_gui_custom_container.

DATA editor TYPE REF TO cl_gui_textedit.

DATA texto TYPE string.

START-OF-SELECTION.

CALL SCREEN '100'.

&----


*& Module USER_COMMAND_0100 INPUT

&----


  • text

----


MODULE user_command_0100 INPUT.

IF sy-ucomm EQ 'GRABAR'.

CALL METHOD editor->get_textstream

IMPORTING

text = texto.

MOVE texto TO nombre.

ENDIF.

IF sy-ucomm EQ 'EXIT'.

LEAVE PROGRAM.

ENDIF.

ENDMODULE. " USER_COMMAND_0100 INPUT

&----


*& Module STATUS_0100 OUTPUT

&----


  • text

----


MODULE status_0100 OUTPUT.

SET PF-STATUS '200'.

IF container IS INITIAL OR editor IS INITIAL.

CREATE OBJECT container

EXPORTING container_name = 'CONTAINER'.

CREATE OBJECT editor

EXPORTING parent = container.

ENDIF.

ENDMODULE. " STATUS_0100 OUTPUT