<?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: Using the METHOD textnote_editor-&amp;gt;limit_text in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-the-method-textnote-editor-gt-limit-text/m-p/6619658#M1440326</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Carlos,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you are talking about SAP standard class CL_GUI_TEXTEDIT, then you could create a new class INHERITED FROM CL_GUI_TEXTEDIT. Then you can use the protected method LIMIT_TEXT inside any new method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CLASS LCL_TEXTEDIT DEFINITION INHERITING FROM CL_GUI_TEXTEDIT.
PUBLIC SECTION.
  methods MY_LIMIT_TEXT
    importing
      MAX_NUMBER_CHARS type I
    exceptions
      ERROR_CNTL_CALL_METHOD .

ENDCLASS.
CLASS LCL_TEXTEDIT IMPLEMENTATION.
  method my_limit_text.
    limit_text( MAX_NUMBER_CHARS ).
  endmethod.
ENDCLASS.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you have a public method. But as you do not describe your questions details, i have doubts that this solution works for you.&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>Tue, 09 Feb 2010 13:31:21 GMT</pubDate>
    <dc:creator>Clemenss</dc:creator>
    <dc:date>2010-02-09T13:31:21Z</dc:date>
    <item>
      <title>Using the METHOD textnote_editor-&gt;limit_text</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-the-method-textnote-editor-gt-limit-text/m-p/6619657#M1440325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to use the method "textnote_editor-&amp;gt;limit_text" to limit the rows in the text box, but there is an error message that this method is "Protected or Private". How can I use it or limit the rows in my text box ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Carlos Lima.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Feb 2010 12:50:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-the-method-textnote-editor-gt-limit-text/m-p/6619657#M1440325</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-09T12:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using the METHOD textnote_editor-&gt;limit_text</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-the-method-textnote-editor-gt-limit-text/m-p/6619658#M1440326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Carlos,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you are talking about SAP standard class CL_GUI_TEXTEDIT, then you could create a new class INHERITED FROM CL_GUI_TEXTEDIT. Then you can use the protected method LIMIT_TEXT inside any new method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CLASS LCL_TEXTEDIT DEFINITION INHERITING FROM CL_GUI_TEXTEDIT.
PUBLIC SECTION.
  methods MY_LIMIT_TEXT
    importing
      MAX_NUMBER_CHARS type I
    exceptions
      ERROR_CNTL_CALL_METHOD .

ENDCLASS.
CLASS LCL_TEXTEDIT IMPLEMENTATION.
  method my_limit_text.
    limit_text( MAX_NUMBER_CHARS ).
  endmethod.
ENDCLASS.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you have a public method. But as you do not describe your questions details, i have doubts that this solution works for you.&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>Tue, 09 Feb 2010 13:31:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-the-method-textnote-editor-gt-limit-text/m-p/6619658#M1440326</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2010-02-09T13:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: Using the METHOD textnote_editor-&gt;limit_text</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-the-method-textnote-editor-gt-limit-text/m-p/6619659#M1440327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Clemens how are you, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your help, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;well, my problem continues, I declareted the public section like you sent-me and the error is the same, the error message is the Method LIMET_TEXT is private. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Access to protected method "&lt;STRONG&gt;LIMIT_TEXT&lt;/STRONG&gt;" is not allowed."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is, I made a copy of standard FM "&lt;STRONG&gt;TXW_TEXTNOTE_EDIT&lt;/STRONG&gt;" and I'm changing some declarations to try to block the rows in the text box, the user should not save a long text in the process, only the resume, thats why I need to block the rows and I tried to change some methods but nothing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I can do to do it  on this FM ?.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Carlos Lima.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Feb 2010 12:16:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-the-method-textnote-editor-gt-limit-text/m-p/6619659#M1440327</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-02-11T12:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: Using the METHOD textnote_editor-&gt;limit_text</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-the-method-textnote-editor-gt-limit-text/m-p/6619660#M1440328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Carlos,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what ever you did.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just copied my code to a test program - no syntax error. That means I can use method MY_LIMIT_TEXT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BUT: TXW_TEXTNOTE_EDIT can not save a text. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can count the characters in the table returned and issue an error message instead of saving if there are too many.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* before saving...
field-symbols:
 &amp;lt;TXW_NOTE&amp;gt; type TXW_NOTE.
data:
  lv_charcount type sy-tleng.
loop at lT_TXWNOTE assigning &amp;lt;TXW_NOTE&amp;gt;,
   lv_charcount  =  lv_charcount  + strlen( &amp;lt;TXW_NOTE&amp;gt;-LINE ).
endloop.
if  lv_charcount  &amp;gt; lv_maxchars.
... MESSAGE Ennn(ZXY) with ...
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like that.&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>Thu, 11 Feb 2010 16:57:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-the-method-textnote-editor-gt-limit-text/m-p/6619660#M1440328</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2010-02-11T16:57:28Z</dc:date>
    </item>
  </channel>
</rss>

