Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Save text from Text Editor

mathewzdavis
Active Participant
0 Likes
3,290

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?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,297

Hi Mathew,

You can use FM 'SAVE_TEXT'.

Regards

7 REPLIES 7
Read only

alisson_fragozo
Explorer
0 Likes
2,297

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.

Read only

0 Likes
2,297

Hi Alisson,

Could you please how to save the text.

Regards Mathew

Read only

0 Likes
2,297

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.

Read only

0 Likes
2,297

Can we save text using any FM?

Read only

Former Member
0 Likes
2,298

Hi Mathew,

You can use FM 'SAVE_TEXT'.

Regards

Read only

alessandroieva
Active Participant
0 Likes
2,297

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

Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,297

Steps to follow:

Regards,

Raymond