<?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 control block in not cleared. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/text-control-block-in-not-cleared/m-p/7443876#M1552047</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Note that you have the statement &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;if g_editor is initial.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My guess is that it is not initial after the first pass, and you need to specifically CLEAR the contents of the container when it is NOT initial.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Nov 2010 14:08:11 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-11-23T14:08:11Z</dc:date>
    <item>
      <title>text control block in not cleared.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/text-control-block-in-not-cleared/m-p/7443875#M1552046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Experts,&lt;/P&gt;&lt;P&gt;                  I am using a text control block in my screen program, and typed something and then save it. &lt;/P&gt;&lt;P&gt;But when i run it again, it not cleared the old data that i typed early.&lt;/P&gt;&lt;P&gt;Can anyone help me that how can i clear the data in text control block.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report  ZTEST_SCR&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZTEST_SCR.&lt;/P&gt;&lt;P&gt;DATA:   OK_CODE TYPE SYUCOMM,&lt;/P&gt;&lt;P&gt;        g_editor type ref to cl_gui_textedit,&lt;/P&gt;&lt;P&gt;        g_editor_container type ref to cl_gui_custom_container.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;constants: c_line_length type i value 72.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;define table type for data exchange&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  types: begin of mytable_line,&lt;/P&gt;&lt;P&gt;           line(c_line_length) type c,&lt;/P&gt;&lt;P&gt;         end of mytable_line.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;table to exchange text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  data g_mytable type table of mytable_line.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;necessary to flush the automation queue&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  class cl_gui_cfw definition load.&lt;/P&gt;&lt;P&gt;call screen 100.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Module  STATUS_0100  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE STATUS_0100 OUTPUT.&lt;/P&gt;&lt;P&gt;  SET PF-STATUS '100'.&lt;/P&gt;&lt;P&gt;  SET TITLEBAR '100'.&lt;/P&gt;&lt;P&gt;  if g_editor is initial.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  create control container&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    create object g_editor_container&lt;/P&gt;&lt;P&gt;        exporting&lt;/P&gt;&lt;P&gt;            container_name = 'TEXTEDITOR'&lt;/P&gt;&lt;P&gt;        exceptions&lt;/P&gt;&lt;P&gt;            cntl_error = 1&lt;/P&gt;&lt;P&gt;            cntl_system_error = 2&lt;/P&gt;&lt;P&gt;            create_error = 3&lt;/P&gt;&lt;P&gt;            lifetime_error = 4&lt;/P&gt;&lt;P&gt;            lifetime_dynpro_dynpro_link = 5.&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  create calls constructor, which initializes, creats and links&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   a TextEdit Control&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    create object g_editor&lt;/P&gt;&lt;P&gt;      exporting&lt;/P&gt;&lt;P&gt;         parent = g_editor_container&lt;/P&gt;&lt;P&gt;         wordwrap_mode = cl_gui_textedit=&amp;gt;wordwrap_at_fixed_position&lt;/P&gt;&lt;P&gt;         wordwrap_to_linebreak_mode = cl_gui_textedit=&amp;gt;true&lt;/P&gt;&lt;P&gt;      exceptions&lt;/P&gt;&lt;P&gt;          others = 1.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " STATUS_0100  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Module  USER_COMMAND_0100  INPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE USER_COMMAND_0100 INPUT.&lt;/P&gt;&lt;P&gt;  CASE  ok_code .&lt;/P&gt;&lt;P&gt;  when 'BACK'.&lt;/P&gt;&lt;P&gt;    LEAVE PROGRAM.&lt;/P&gt;&lt;P&gt;  WHEN 'SAVE'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    retrieve table from control&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      call method g_editor-&amp;gt;get_text_as_r3table&lt;/P&gt;&lt;P&gt;          importing&lt;/P&gt;&lt;P&gt;              table = g_mytable&lt;/P&gt;&lt;P&gt;          exceptions&lt;/P&gt;&lt;P&gt;              others = 1.&lt;/P&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " USER_COMMAND_0100  INPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Nov 2010 22:48:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/text-control-block-in-not-cleared/m-p/7443875#M1552046</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-22T22:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: text control block in not cleared.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/text-control-block-in-not-cleared/m-p/7443876#M1552047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Note that you have the statement &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;if g_editor is initial.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My guess is that it is not initial after the first pass, and you need to specifically CLEAR the contents of the container when it is NOT initial.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Nov 2010 14:08:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/text-control-block-in-not-cleared/m-p/7443876#M1552047</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-23T14:08:11Z</dc:date>
    </item>
  </channel>
</rss>

