<?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: Screen behaviour with embedded object cl_gui_textedit in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/screen-behaviour-with-embedded-object-cl-gui-textedit/m-p/4832614#M1130589</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I commented out the destructor and tried the flush at several positions (right behind the get_text), right before the set screen 0 and right behind the call screen, but the text cant be retrieved after the first call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What i'm wondering is that the text from the first call is shown the second time....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Nov 2008 09:12:30 GMT</pubDate>
    <dc:creator>rainer_hbenthal</dc:creator>
    <dc:date>2008-11-20T09:12:30Z</dc:date>
    <item>
      <title>Screen behaviour with embedded object cl_gui_textedit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/screen-behaviour-with-embedded-object-cl-gui-textedit/m-p/4832611#M1130586</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;i've wrote a function module which is called via a pattern in the ABAP Editor (SE38).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This FM has a screen which is defined as modal screen. The screen contains nothing but a single container.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the PBO i'm creating the two controls like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
MODULE status_9000 OUTPUT.
  SET PF-STATUS '9000'.
  SET TITLEBAR '9000'.

  PERFORM build_container.

ENDMODULE.    
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FORM build_container .

  DATA:
    width           TYPE i.

  width = 66.
  IF modus = c_frame.
    width = 66.
  ELSEIF modus = c_hist.
    width = 42.
  ENDIF.

  IF custom_container IS INITIAL.
    CREATE OBJECT custom_container
      EXPORTING
        container_name              = 'CONTAINER'
        lifetime                    = cl_gui_custom_container=&amp;gt;lifetime_imode
      EXCEPTIONS
        cntl_error                  = 1
        cntl_system_error           = 2
        create_error                = 3
        lifetime_error              = 4
        lifetime_dynpro_dynpro_link = 5.

    IF sy-subrc NE 0.
      subrc = 4.
      MESSAGE 'Cant create container' TYPE 'E'.
      RETURN.
    ENDIF.
  ENDIF.

  IF editor IS INITIAL.
    CREATE OBJECT editor
      EXPORTING
        parent                     = custom_container
        wordwrap_mode              = cl_gui_textedit=&amp;gt;wordwrap_at_fixed_position
        wordwrap_position          = width
        wordwrap_to_linebreak_mode = cl_gui_textedit=&amp;gt;true
        lifetime                   = cl_gui_textedit=&amp;gt;lifetime_imode.


    IF sy-subrc &amp;lt;&amp;gt; 0.
      subrc = 4.
      MESSAGE 'Cant create editor' TYPE 'E'.
      RETURN.
    ENDIF.
  ENDIF.

ENDFORM.                    " BUILD_CONTAINER
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the PAI, i'm closing like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
        subrc = 0.
        editor-&amp;gt;free( ).  (*)
        SET SCREEN 0. LEAVE SCREEN.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first time i'm calling this, everything works well. But the second time and all following, the conatiner remains empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i delete the editor-&amp;gt;free( ) (constructor), the editor is shown the second time, but the text i've entered is not given back by &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  CALL METHOD editor-&amp;gt;get_text_as_r3table
    IMPORTING
      table = it_desc.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remember, this works fine if i'm calling the FM the first time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In short terms, after the first call the editor is not shown when the destructor is used, and if it is not used the text cant be retrieved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does it have something to do with the lifetime?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2008 08:16:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/screen-behaviour-with-embedded-object-cl-gui-textedit/m-p/4832611#M1130586</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2008-11-20T08:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Screen behaviour with embedded object cl_gui_textedit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/screen-behaviour-with-embedded-object-cl-gui-textedit/m-p/4832612#M1130587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try using  CALL METHOD cl_gui_cfw=&amp;gt;flush after using &lt;/P&gt;&lt;P&gt;CALL METHOD editor-&amp;gt;get_text_as_r3table&lt;/P&gt;&lt;P&gt;for  the first time with out editor-&amp;gt;free( ).  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2008 08:40:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/screen-behaviour-with-embedded-object-cl-gui-textedit/m-p/4832612#M1130587</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-20T08:40:12Z</dc:date>
    </item>
    <item>
      <title>Re: Screen behaviour with embedded object cl_gui_textedit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/screen-behaviour-with-embedded-object-cl-gui-textedit/m-p/4832613#M1130588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I commented out the destructor and tried &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cl_gui_cfw=&amp;gt;flush( )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at different positions (direct after get_text), diectly before SET SCREEN 0. and dierctly after the call screen 9000. There's no change, i can  not retrieve the entered text the second time and all follwoing calls.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What i'm wondering is that the text from the first call is displayed the second time in the control... even when i clear the instance and create a new one....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other idea?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2008 08:59:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/screen-behaviour-with-embedded-object-cl-gui-textedit/m-p/4832613#M1130588</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2008-11-20T08:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: Screen behaviour with embedded object cl_gui_textedit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/screen-behaviour-with-embedded-object-cl-gui-textedit/m-p/4832614#M1130589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I commented out the destructor and tried the flush at several positions (right behind the get_text), right before the set screen 0 and right behind the call screen, but the text cant be retrieved after the first call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What i'm wondering is that the text from the first call is shown the second time....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2008 09:12:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/screen-behaviour-with-embedded-object-cl-gui-textedit/m-p/4832614#M1130589</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2008-11-20T09:12:30Z</dc:date>
    </item>
    <item>
      <title>Re: Screen behaviour with embedded object cl_gui_textedit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/screen-behaviour-with-embedded-object-cl-gui-textedit/m-p/4832615#M1130590</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 also faced the same probelm with refreshing the container editor.&lt;/P&gt;&lt;P&gt;Try to use methods&lt;/P&gt;&lt;P&gt;CALL METHOD editor-&amp;gt;set_textstream&lt;/P&gt;&lt;P&gt;          EXPORTING&lt;/P&gt;&lt;P&gt;            text                   = ' '&lt;/P&gt;&lt;P&gt;          EXCEPTIONS&lt;/P&gt;&lt;P&gt;            error_cntl_call_method = 1&lt;/P&gt;&lt;P&gt;            not_supported_by_gui   = 2&lt;/P&gt;&lt;P&gt;            OTHERS                 = 3.&lt;/P&gt;&lt;P&gt;        IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD editor-&amp;gt;set_text_as_r3table&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   TABLE           =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   ERROR_DP        = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   ERROR_DP_CREATE = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   others          = 3&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            .&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when you try to come out of the screen and run it for the second time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure with the output but it was used in my program..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this works... &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2008 09:22:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/screen-behaviour-with-embedded-object-cl-gui-textedit/m-p/4832615#M1130590</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-20T09:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: Screen behaviour with embedded object cl_gui_textedit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/screen-behaviour-with-embedded-object-cl-gui-textedit/m-p/4832616#M1130591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;closed unanswered&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2008 08:06:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/screen-behaviour-with-embedded-object-cl-gui-textedit/m-p/4832616#M1130591</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2008-11-25T08:06:34Z</dc:date>
    </item>
  </channel>
</rss>

