<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Read Text from Text Editor Object in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-from-text-editor-object/m-p/2803005#M654730</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Narayanan ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. is the representation for non-printable non-diaplayable characters. See hex representation in debugger.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You way do this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;  cr_lf type string.&lt;/P&gt;&lt;P&gt;concaténate &lt;/P&gt;&lt;P&gt;  cl_abap_char_utilities=&amp;gt;CR&lt;/P&gt;&lt;P&gt;  cl_abap_char_utilities=&amp;gt;LF&lt;/P&gt;&lt;P&gt;  into cr_lf.&lt;/P&gt;&lt;P&gt;replace all occurences of cr_lf in stream with ' '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Sep 2007 12:21:17 GMT</pubDate>
    <dc:creator>Clemenss</dc:creator>
    <dc:date>2007-09-03T12:21:17Z</dc:date>
    <item>
      <title>Read Text from Text Editor Object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-from-text-editor-object/m-p/2802998#M654723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;   I am using the object cl_gui_textedit to get data from user. To read the data i am using the method 'get_text_as_stream' but i am unable to determine wat variable will be able to receive the data so fetched.&lt;/P&gt;&lt;P&gt;Its a pointer of type standard table inside the method.&lt;/P&gt;&lt;P&gt;I just wanna have 200 words out of the Text edit.&lt;/P&gt;&lt;P&gt;So wat is the var type to be assigned to Field symbol for the same to get the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Sep 2007 15:27:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-from-text-editor-object/m-p/2802998#M654723</guid>
      <dc:creator>KN-Nampoothiry</dc:creator>
      <dc:date>2007-09-02T15:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: Read Text from Text Editor Object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-from-text-editor-object/m-p/2802999#M654724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The text of the object will come as records in the table type parameter. Declare an internal table of character type say of length 200.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : itab TYPE STANDARD TABLE OF char200. Take this length as the maximum possible length of the record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get the data into this internal table and then read it to get your data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Best Regards,&lt;/P&gt;&lt;P&gt;Vikas Bittera.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Sep 2007 15:35:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-from-text-editor-object/m-p/2802999#M654724</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-02T15:35:32Z</dc:date>
    </item>
    <item>
      <title>Re: Read Text from Text Editor Object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-from-text-editor-object/m-p/2803000#M654725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Narayanan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as fasr as I remember you have to SAVE the text then the editor is closed and it is in the internal table you passed before.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Sep 2007 17:54:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-from-text-editor-object/m-p/2803000#M654725</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2007-09-02T17:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: Read Text from Text Editor Object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-from-text-editor-object/m-p/2803001#M654726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why don't you try this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
constants: c_line_length type i value 200.

types: begin of t_texttab_line,
       line(c_line_length) type c,
       end of t_texttab_line.

data : wa_texttab type t_texttab_line.
data : g_texttab type table of t_texttab_line.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are using module pool call the editor in PB0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Module  STATUS_0100  OUTPUT
*&amp;amp;---------------------------------------------------------------------*
module status_1300 output.
  if g_editor is initial.
    g_repid = sy-repid.

    create object g_editor_container
        exporting
            container_name = 'TEXTEDITOR'
        exceptions
            cntl_error = 1
            cntl_system_error = 2
            create_error = 3
            lifetime_error = 4
            lifetime_dynpro_dynpro_link = 5.
    if sy-subrc ne 0.
    endif.

    create object g_editor
      exporting
         parent = g_editor_container
         wordwrap_mode = cl_gui_textedit=&amp;gt;wordwrap_at_fixed_position
         wordwrap_to_linebreak_mode = cl_gui_textedit=&amp;gt;true
      exceptions
          others = 1.
    if sy-subrc ne 0.
    endif.
  endif.

endmodule.                    "status_1300 OUTPUT
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then for retrieve the value &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* retrieve table from control
  call method g_editor-&amp;gt;get_text_as_r3table
    importing
      table  = g_texttab
    exceptions
      others = 1.

* Free the container
  if not g_editor is initial.
    call method g_editor-&amp;gt;free
      exceptions
        others = 1.
    if sy-subrc ne 0.
    endif.
    free g_editor.
  endif.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May this will help you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Sep 2007 18:04:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-from-text-editor-object/m-p/2803001#M654726</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2007-09-02T18:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: Read Text from Text Editor Object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-from-text-editor-object/m-p/2803002#M654727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;That is perfect and solved. but some # is getting introduced in it when user hits enter.&lt;/P&gt;&lt;P&gt;Is there any ways to avoid it. Anyways suggestions are very useful.&lt;/P&gt;&lt;P&gt;Thanx a lot.&lt;/P&gt;&lt;P&gt;Please suggest if any ways to avoid the 2 hash '##' that comes in place of Enter key by user.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Sep 2007 11:25:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-from-text-editor-object/m-p/2803002#M654727</guid>
      <dc:creator>KN-Nampoothiry</dc:creator>
      <dc:date>2007-09-03T11:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: Read Text from Text Editor Object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-from-text-editor-object/m-p/2803003#M654728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;    if you are using the method GET_TEXT_AS_R3TABLE ,this problem will be erased.In GET_TEXT_AS_STREAM the table is returned with line feed and carriage return.Thats y that is coming.In r3table there will be no problems like that.The procedures are same as stream only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Sep 2007 11:55:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-from-text-editor-object/m-p/2803003#M654728</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-03T11:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: Read Text from Text Editor Object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-from-text-editor-object/m-p/2803004#M654729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I had used the GET_TEXT_AS_R3TABLE and it was  working satisfactorily .&lt;/P&gt;&lt;P&gt;The req. was to understand the stream functionality and to avoid a loop/read on table.&lt;/P&gt;&lt;P&gt;Also as in my requirement there was a word limit of 200. I wanted to use this so i can take the output directly to a var of char200 without actually looping at the table.&lt;/P&gt;&lt;P&gt;The variable declaration was very helpful and new to me.Thnx Vivek.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyways if anyne knows why carriage return is represented as ## in the stream .&lt;/P&gt;&lt;P&gt;do reply. Or is it that the carriage return/line feed is ## .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Sep 2007 12:17:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-from-text-editor-object/m-p/2803004#M654729</guid>
      <dc:creator>KN-Nampoothiry</dc:creator>
      <dc:date>2007-09-03T12:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: Read Text from Text Editor Object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-from-text-editor-object/m-p/2803005#M654730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Narayanan ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. is the representation for non-printable non-diaplayable characters. See hex representation in debugger.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You way do this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;  cr_lf type string.&lt;/P&gt;&lt;P&gt;concaténate &lt;/P&gt;&lt;P&gt;  cl_abap_char_utilities=&amp;gt;CR&lt;/P&gt;&lt;P&gt;  cl_abap_char_utilities=&amp;gt;LF&lt;/P&gt;&lt;P&gt;  into cr_lf.&lt;/P&gt;&lt;P&gt;replace all occurences of cr_lf in stream with ' '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Sep 2007 12:21:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-from-text-editor-object/m-p/2803005#M654730</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2007-09-03T12:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: Read Text from Text Editor Object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-from-text-editor-object/m-p/2803006#M654731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;    while using stream method,the text is stored as a stream with line feeds stored as ##.To work with stream u can use the FM CONVERT_STREAM_TO_ITF_TEXT after calling the method.See the demo program SAPSCRIPT_DEMO_NOTE_EDITOR.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Sep 2007 12:43:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-from-text-editor-object/m-p/2803006#M654731</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-03T12:43:36Z</dc:date>
    </item>
    <item>
      <title>Re: Read Text from Text Editor Object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-from-text-editor-object/m-p/2803007#M654732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thnkx for help.It was really useful &amp;amp; knowledgeable.&lt;/P&gt;&lt;P&gt;Thnkx Clemens &amp;amp; TT.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Narayanan Nampoothiry K on Aug 1, 2008 10:49 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Sep 2007 12:51:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-text-from-text-editor-object/m-p/2803007#M654732</guid>
      <dc:creator>KN-Nampoothiry</dc:creator>
      <dc:date>2007-09-03T12:51:42Z</dc:date>
    </item>
  </channel>
</rss>

