‎2006 Dec 10 11:13 AM
Hi
i wrote this code to show editor
i want to show text in the editor and to habe to option to change it and save
but i dont have option to do it.
How can i save the new text?
Maybe you have an example of better editor?
Thanks
The code:
*Create LV_DOCKING
CREATE OBJECT LV_DOCKING
EXPORTING
REPID = LV_REPID
DYNNR = SY-DYNNR
SIDE = CL_GUI_DOCKING_CONTAINER=>DOCK_AT_BOTTOM
EXTENSION = '300'
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
CREATE_ERROR = 3
LIFETIME_ERROR = 4
LIFETIME_DYNPRO_DYNPRO_LINK = 5.
ENDIF .
*Set posion
CALL METHOD LV_DOCKING->SET_WIDTH
EXPORTING
WIDTH = 390.
IF LV_EDITOR IS INITIAL.
*Create editor
CREATE OBJECT LV_EDITOR
EXPORTING
PARENT = LV_DOCKING
WORDWRAP_MODE = CL_GUI_TEXTEDIT=>WORDWRAP_AT_FIXED_POSITION
WORDWRAP_POSITION = 256
MAX_NUMBER_CHARS = 100000.
ENDIF .
CALL METHOD LV_EDITOR->SET_TEXT_AS_R3TABLE
EXPORTING
TABLE = LT_TEXTLINES
EXCEPTIONS
OTHERS = 1.
CALL METHOD LV_EDITOR->GET_TEXT_AS_R3TABLE
IMPORTING
TABLE = LT_TEXTLINES
EXCEPTIONS
ERROR_DP = 1
ERROR_CNTL_CALL_METHOD = 2
ERROR_DP_CREATE = 3
POTENTIAL_DATA_LOSS = 4
OTHERS = 5.
*
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
ENDIF.
‎2006 Dec 10 11:15 AM
Hi,
Cant you try the EDITOR-CALL FOR ITAB command. you can set some default text into it and also retrieve the changed text also.
regards,
Mahesh
‎2006 Dec 10 11:17 AM
this call would get you the user entered text.
CALL METHOD LV_EDITOR->GET_TEXT_AS_R3TABLE
IMPORTING
TABLE = LT_TEXTLINES
EXCEPTIONS
ERROR_DP = 1
ERROR_CNTL_CALL_METHOD = 2
ERROR_DP_CREATE = 3
POTENTIAL_DATA_LOSS = 4
OTHERS = 5.
*
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
you seems to already use it. are you having problem in that.
Regards
Raja
‎2006 Dec 10 11:24 AM
‎2006 Dec 10 11:24 AM
Hi
Thanks about the answers
But i didnt undrtsand how i can save the data i wrote in the editor
i dont have save icon
‎2006 Dec 10 11:43 AM
you have to set PF status in your application for save button and onclick of that you have to use the method explined aboe to get the user entered text and then save it.
Regards
Raja