‎2015 Apr 09 1:58 PM
In module pool, I have created a custom control and created the text editor ..Its working fine..
But how to save this text and how to retrieve the text later?
‎2015 Apr 09 2:32 PM
‎2015 Apr 09 2:06 PM
Hi,
Use this method:
data: field_ref(200),
table LIKE TABLE OF field_ref.
CALL METHOD cl_gui_textedit->get_text_as_r3table
IMPORTING
table = table.
‎2015 Apr 09 2:10 PM
Hi Alisson,
Could you please how to save the text.
Regards Mathew
‎2015 Apr 09 2:18 PM
Mathew, you have a texteditor (cl_gui_textedit) in your screen right ? If it contains something written, you can use the method cl_gui_textedit->get_text_as_r3table to store the text in an internal table.
‎2015 Apr 09 2:27 PM
‎2015 Apr 09 2:32 PM
‎2015 Apr 09 2:46 PM
Hi,
use below code:
DATA BEGIN OF theader.
INCLUDE STRUCTURE thead.
DATA END OF theader.
DATA: it_line LIKE tline OCCURS 0 WITH HEADER LINE.
theader-tdobject = <TEXT_OBJECT>.
theader-tdname. "= <TEXT_NAME>.
theader-tdid = <TEXT_ID>.
theader-tdspras = sy-langu.
* Line tab testo
line-tdformat = '*'.
and after insert the line of the text into it_line
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
client = sy-mandt
header = theader
savemode_direct = 'X'
TABLES
lines = it_line[].
COMMIT WORK AND WAIT.
let me know,
AI
‎2015 Apr 09 3:22 PM
Steps to follow:
Regards,
Raymond