<?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: Text Editor not fetching value in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor-not-fetching-value/m-p/7700789#M1577997</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why don't you use the method GET_TEXTSTREAM, GET_TEXT_AS_R3TABLE or GET_TEXT_AS_STREAM of class CL_GUI_TEXTEDIT instead of GET_SELECTED_TEXTSTREAM in the PAI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ranganath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Feb 2011 04:50:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-02-18T04:50:48Z</dc:date>
    <item>
      <title>Text Editor not fetching value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor-not-fetching-value/m-p/7700788#M1577996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We need to add a text editor for the user to enter comments. We wrote the below logic but the text is not being fecthed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

MODULE pbo OUTPUT.
  DATA: lv_text1 TYPE string.
  gv_mycontainer = 'CC_TEXT'.
  IF gv_ss_editor IS INITIAL.
*   create control container
    CREATE OBJECT gv_ss_container
        EXPORTING
            container_name = gv_mycontainer
        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 gv_ss_editor
          EXPORTING
           parent = gv_ss_container
           wordwrap_mode =
              cl_gui_textedit=&amp;gt;wordwrap_at_fixed_position
           wordwrap_position = 25
           wordwrap_to_linebreak_mode = cl_gui_textedit=&amp;gt;true.
  ENDIF.

  CALL METHOD gv_ss_editor-&amp;gt;set_toolbar_mode
    EXPORTING
      toolbar_mode = cl_gui_textedit=&amp;gt;false.
  CALL METHOD gv_ss_editor-&amp;gt;set_statusbar_mode
    EXPORTING
      statusbar_mode = cl_gui_textedit=&amp;gt;false.

  IF NOT proj-details IS INITIAL.
    lv_text1 = proj-details.
    CALL METHOD gv_ss_editor-&amp;gt;set_textstream
      EXPORTING
        text = lv_text1.
  ENDIF.
ENDMODULE.                 " pbo  OUTPUT

MODULE pai INPUT.
  DATA: lv_text TYPE string.
  CALL METHOD gv_ss_editor-&amp;gt;get_selected_textstream
    IMPORTING
      selected_text = lv_text.
  proj-details = lv_text.
ENDMODULE.                 " pai  INPUT
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I see in debugging mode, in PAI module, sy-tabix is becoming 1 but lv_text doesn't have any value. Did I go wrong somewhere?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly suggest.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Feb 2011 04:46:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor-not-fetching-value/m-p/7700788#M1577996</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-18T04:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: Text Editor not fetching value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor-not-fetching-value/m-p/7700789#M1577997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why don't you use the method GET_TEXTSTREAM, GET_TEXT_AS_R3TABLE or GET_TEXT_AS_STREAM of class CL_GUI_TEXTEDIT instead of GET_SELECTED_TEXTSTREAM in the PAI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ranganath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Feb 2011 04:50:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor-not-fetching-value/m-p/7700789#M1577997</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-18T04:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: Text Editor not fetching value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor-not-fetching-value/m-p/7700790#M1577998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried using GET_TEXTSTREAM. But still the problem persists. When I open the screen for the first time and enter some text and save, it's being saved in the table. But when I reopen it again and change the text, though sy-tabix is 1, value is not being fetched.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Feb 2011 05:40:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor-not-fetching-value/m-p/7700790#M1577998</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-18T05:40:57Z</dc:date>
    </item>
    <item>
      <title>Re: Text Editor not fetching value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor-not-fetching-value/m-p/7700791#M1577999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks to be the data is buffered in the container. Hence, you might not be able to view the changes done to the editor. Why don't you refresh the buffer or flush the buffer before each time it is opened. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ranganath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Feb 2011 05:55:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor-not-fetching-value/m-p/7700791#M1577999</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-02-18T05:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: Text Editor not fetching value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor-not-fetching-value/m-p/7700792#M1578000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Ranganath&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm also facing the similar issue of what srinivas has faced. Could you please explain me how to flush the buffer of the container before each time it is opened.&lt;/P&gt;&lt;P&gt;please help me in solving my problem. Thanks in advacne!&lt;/P&gt;&lt;P&gt;The below is the code written.&lt;/P&gt;&lt;P&gt;IN PBO:&lt;/P&gt;&lt;P&gt;IF init IS INITIAL.&lt;/P&gt;&lt;P&gt;init = 'X'.&lt;/P&gt;&lt;P&gt;CREATE OBJECT:&lt;/P&gt;&lt;P&gt;container EXPORTING container_name = 'TEXTEDIT',&lt;/P&gt;&lt;P&gt;editor EXPORTING parent = container,&lt;/P&gt;&lt;P&gt;handle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;event-eventid = cl_gui_textedit=&amp;gt;event_f1.&lt;/P&gt;&lt;P&gt;event-appl_event = 'X'. "system event&lt;/P&gt;&lt;P&gt;APPEND event TO event_tab.&lt;/P&gt;&lt;P&gt;event-eventid = cl_gui_textedit=&amp;gt;event_f4.&lt;/P&gt;&lt;P&gt;event-appl_event = 'X'. "application event&lt;/P&gt;&lt;P&gt;APPEND event TO event_tab.&lt;/P&gt;&lt;P&gt;CALL METHOD: editor-&amp;gt;set_registered_events&lt;/P&gt;&lt;P&gt;EXPORTING events = event_tab.&lt;/P&gt;&lt;P&gt;SET HANDLER handle-&amp;gt;handle_f1&lt;/P&gt;&lt;P&gt;handle-&amp;gt;handle_f4 FOR editor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_text1] = it_text[.&lt;/P&gt;&lt;P&gt;CLEAR it_text[].&lt;/P&gt;&lt;P&gt;CALL METHOD editor-&amp;gt;set_text_as_stream&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;text = it_text1.&lt;/P&gt;&lt;P&gt;CLEAR : lv_lines , lv_lines_to.&lt;/P&gt;&lt;P&gt;DESCRIBE TABLE it_text1 LINES lv_lines.&lt;/P&gt;&lt;P&gt;lv_lines_to = lv_lines + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IN PAI:&lt;/P&gt;&lt;P&gt;IF NOT editor IS INITIAL.&lt;/P&gt;&lt;P&gt;CALL METHOD editor-&amp;gt;get_text_as_stream&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;text = it_text1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD editor-&amp;gt;free&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;OTHERS = 1.&lt;/P&gt;&lt;P&gt;IF sy-subrc NE 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;add your handling&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2011 17:37:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor-not-fetching-value/m-p/7700792#M1578000</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-16T17:37:50Z</dc:date>
    </item>
  </channel>
</rss>

