‎2011 Jan 12 9:25 AM
Dear All,
I am working on module pool programming and i have used Texteditor to get multi line text.
There is records in ALV Grid, when i select the record and click on change button the text in textbox is coming into texteditor.
When i changed the text in texteditor and click on update button it is not capturing the changed text so because of it the "z" table is not updated.
How do i get dynamically the changed text of texteditor into internal table?.
Thanks & Regards,
Saurabh
‎2011 Jan 12 9:36 AM
‎2011 Jan 12 10:02 AM
Dear Manas,
I have used the method which you suggested but it is not pulling up any value i.e. any changed text in text editor.
do you have any other suggestion?
Thanks & Regards,
Saurabh
‎2011 Jan 12 10:52 AM
the code written is:
MODULE STATUS_0100 OUTPUT.
CREATE OBJECT G_EDITOR_CONTAINER
EXPORTING
CONTAINER_NAME = 'CONTAINER'
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
CREATE_ERROR = 3
LIFETIME_ERROR = 4
LIFETIME_DYNPRO_DYNPRO_LINK = 5.
G_MYCONTAINER = 'CONTAINER'.
create calls constructor, which initializes, creats and links
TextEdit Control
CREATE OBJECT EDITOR
EXPORTING
PARENT = G_EDITOR_CONTAINER
WORDWRAP_MODE =
cl_gui_textedit=>wordwrap_off
CL_GUI_TEXTEDIT=>WORDWRAP_AT_FIXED_POSITION
cl_gui_textedit=>WORDWRAP_AT_WINDOWBORDER
WORDWRAP_POSITION = LINE_LENGTH
WORDWRAP_TO_LINEBREAK_MODE = CL_GUI_TEXTEDIT=>TRUE.
CALL METHOD editor->set_text_as_r3table
EXPORTING table = g_mytable.
endmodule.
MODULE USER_COMMAND_0100 INPUT.
case sy-ucomm
when 'SAVE'
refresh g_mytable.
CALL METHOD editor->get_text_as_r3table
IMPORTING
table = g_mytable.
CALL METHOD cl_gui_cfw=>flush
EXCEPTIONS
OTHERS = 1.
endcase.
endmodule.
so initially when text is inserted in text editor and click on save button the text got saved in the table. but when same text is retrieved from "z" table and set it into the text editor and made changes in the text of text editor and click on save button it is not capturing the chaged text.
‎2011 Jan 12 12:52 PM
You can try FM 'CATSXT_SIMPLE_TEXT_EDITOR'.
DATA: lv_text_title TYPE sy-title,
lt_text TYPE catsxt_longtext_itab.
CALL FUNCTION 'CATSXT_SIMPLE_TEXT_EDITOR'
EXPORTING
im_title = lv_text_title
CHANGING
ch_text = lt_text.
Regards,
Vijay
Edited by: SharmaV on Jan 12, 2011 1:53 PM