<?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 Text Editor in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor/m-p/3054792#M723357</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am displaying text editor on the screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    create object gt_textbox  "cc_container
             exporting
                   container_name    = 'GT_TEXTBOX'.

    create object text_editor
    exporting
    parent = gt_textbox.  "cc_container.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to limit the number of lines in the text editor to 3.&lt;/P&gt;&lt;P&gt;How can i do that.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Nov 2007 17:16:48 GMT</pubDate>
    <dc:creator>SG141</dc:creator>
    <dc:date>2007-11-15T17:16:48Z</dc:date>
    <item>
      <title>Text Editor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor/m-p/3054792#M723357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am displaying text editor on the screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    create object gt_textbox  "cc_container
             exporting
                   container_name    = 'GT_TEXTBOX'.

    create object text_editor
    exporting
    parent = gt_textbox.  "cc_container.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to limit the number of lines in the text editor to 3.&lt;/P&gt;&lt;P&gt;How can i do that.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2007 17:16:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor/m-p/3054792#M723357</guid>
      <dc:creator>SG141</dc:creator>
      <dc:date>2007-11-15T17:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: Text Editor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor/m-p/3054793#M723358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Karthik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Use SET_HEIGHT Method to limit the number of lines in editor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if it helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Satish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2007 17:27:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor/m-p/3054793#M723358</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-15T17:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: Text Editor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor/m-p/3054794#M723359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: i_height type i value 3.

call method text_editor-&amp;gt;SET_HEIGHT
exporting HEIGHT = i_height.  " &amp;lt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2007 17:35:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor/m-p/3054794#M723359</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2007-11-15T17:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: Text Editor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor/m-p/3054795#M723360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Karthik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls check the following theread. Here some sample codes are there. Hope it will be useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="124532"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it will solve your problem..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points if useful....&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;ilesh 24x7&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2007 17:36:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor/m-p/3054795#M723360</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-15T17:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: Text Editor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor/m-p/3054796#M723361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Even if i use the code...&lt;/P&gt;&lt;P&gt;I notice that user is able to enter more than three lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;call method text_editor-&amp;gt;SET_HEIGHT
exporting HEIGHT = i_height.  " &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my code for the Text Editor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: GT_TEXTBOX   TYPE REF TO CL_GUI_CUSTOM_CONTAINER.
DATA: C_CONTROL1 TYPE SCRFNAME VALUE 'GT_TEXTBOX'.
DATA: TEXT_EDITOR TYPE REF TO CL_GUI_TEXTEDIT.

 CREATE OBJECT GT_TEXTBOX  "cc_container
             EXPORTING
                   CONTAINER_NAME    = 'GT_TEXTBOX'.

    CREATE OBJECT TEXT_EDITOR
    EXPORTING
    PARENT = GT_TEXTBOX
    WORDWRAP_MODE    = 2
    MAX_NUMBER_CHARS = 374
    WORDWRAP_POSITION = 128.      "cc_container.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Objective is to lock the Text editor with 3 lines.&lt;/P&gt;&lt;P&gt;How can i do that&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Karthik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Nov 2007 18:12:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor/m-p/3054796#M723361</guid>
      <dc:creator>SG141</dc:creator>
      <dc:date>2007-11-19T18:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: Text Editor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor/m-p/3054797#M723362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Karthik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one way to get ur solution is to give error message when user tries to enter 4th line..&lt;/P&gt;&lt;P&gt;Look at the bold part of code in below example... use OOPS it will help u...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
report zrep1 .
 
data:
      dockingleft  type ref to cl_gui_docking_container,
      text_editor    type ref to cl_gui_textedit,
      repid type syrepid.
 
data: textlines type table of tline-tdline,
      wa_text type tline-tdline.
 
data: lines type i.
 
parameters: p_check.
 
at selection-screen output.
 
  repid = sy-repid.
 
  create object dockingleft
              exporting repid     = repid
                        dynnr     = sy-dynnr
                        side      = dockingleft-&amp;gt;dock_at_left
                        extension = 1070.
 
  create object text_editor
              exporting
*                   wordwrap_mode    = 2
*                   max_number_chars = 216
*                   wordwrap_position = 72
                   parent     = dockingleft.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;at selection-screen.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  check sy-ucomm = 'ONLI'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  call method text_editor-&amp;gt;get_text_as_r3table&lt;/P&gt;&lt;P&gt;     importing&lt;/P&gt;&lt;P&gt;           table              = textlines&lt;/P&gt;&lt;P&gt;     exceptions&lt;/P&gt;&lt;P&gt;           others             = 1.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  describe table textlines lines lines.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  if lines &amp;gt; 3.&lt;/P&gt;&lt;P&gt;    message e001(00) with 'The line limit is two'.&lt;/P&gt;&lt;P&gt;  endif.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
start-of-selection.
 
  loop at textlines into wa_text.
    write:/ wa_text.
  endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it will solve ur problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points if useful..&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;ilesh 24x7&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Nov 2007 20:06:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor/m-p/3054797#M723362</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-19T20:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: Text Editor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor/m-p/3054798#M723363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is a Module Pool Program and I am afraid we can't use At selection screen.&lt;/P&gt;&lt;P&gt;Apologize if i am not clear in my question earlier.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Nov 2007 22:05:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor/m-p/3054798#M723363</guid>
      <dc:creator>SG141</dc:creator>
      <dc:date>2007-11-19T22:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: Text Editor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor/m-p/3054799#M723364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As suggested earlier, you can check the number of entries in the text table after user action eg. PAI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;call method text_editor-&amp;gt;get_text_as_r3table
importing
table = textlines
exceptions
others = 1.

describe table textlines lines lines.
if lines &amp;gt; 4.
message e001(00) with 'The line limit is three'.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Nov 2007 22:17:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/text-editor/m-p/3054799#M723364</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2007-11-19T22:17:38Z</dc:date>
    </item>
  </channel>
</rss>

