<?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: CL_GUI_TEXTEDIT refresh problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-textedit-refresh-problem/m-p/6244177#M1382575</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;Please indent your post and use formating so that it is readable and understandable&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Oct 2009 09:15:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-10-15T09:15:31Z</dc:date>
    <item>
      <title>CL_GUI_TEXTEDIT refresh problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-textedit-refresh-problem/m-p/6244176#M1382574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Gurus ,&lt;/P&gt;&lt;P&gt;I made a custom screen that has 3 texteditor controls . The screen works fine but the one problem that i have is the below :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 2 kind of users: Full user - Particiopant user &lt;/P&gt;&lt;P&gt;When i load the screen at the first time all the controls are editable .&lt;/P&gt;&lt;P&gt;When i choose the the participant user i want the texteditor controls to be in readonly mode.&lt;/P&gt;&lt;P&gt;So i do the following :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF PARTICIPANTS = 'X'.

    CALL METHOD G_EDITOR_1-&amp;gt;SET_READONLY_MODE
        EXPORTING
          READONLY_MODE          = '1'
        EXCEPTIONS
          ERROR_CNTL_CALL_METHOD = 1
          INVALID_PARAMETER      = 2
          OTHERS                 = 3.
      IF SY-SUBRC &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when i change the user to full can't change !!!!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look  the problem in steps:&lt;/P&gt;&lt;P&gt;1.  load the screen in editable mode &lt;/P&gt;&lt;P&gt;2. changing the controls to readonly       &lt;STRONG&gt;ok&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;3. changing to editble       &lt;STRONG&gt;false&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Only one time i can change the screen control !!!!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;look my code ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;


  IF G_EDITOR_1 IS INITIAL.

*   initilize local variable with sy-repid, since sy-repid doesn't work
*    as parameter directly.
    G_REPID = SY-REPID.

*   create control container
    CREATE OBJECT G_EDITOR_CONTAINER_1
        EXPORTING
            CONTAINER_NAME = 'TEXTEDITOR1'
        EXCEPTIONS
            CNTL_ERROR = 1
            CNTL_SYSTEM_ERROR = 2
            CREATE_ERROR = 3
            LIFETIME_ERROR = 4
            LIFETIME_DYNPRO_DYNPRO_LINK = 5.
    IF SY-SUBRC NE 0.
*      add your handling
    ENDIF.

    CREATE OBJECT G_EDITOR_CONTAINER_2
        EXPORTING
            CONTAINER_NAME = 'TEXTEDITOR2'
        EXCEPTIONS
            CNTL_ERROR = 1
            CNTL_SYSTEM_ERROR = 2
            CREATE_ERROR = 3
            LIFETIME_ERROR = 4
            LIFETIME_DYNPRO_DYNPRO_LINK = 5.
    IF SY-SUBRC NE 0.
*      add your handling
    ENDIF.

    CREATE OBJECT G_EDITOR_CONTAINER_5
        EXPORTING
            CONTAINER_NAME = 'TEXTEDITOR5'
        EXCEPTIONS
            CNTL_ERROR = 1
            CNTL_SYSTEM_ERROR = 2
            CREATE_ERROR = 3
            LIFETIME_ERROR = 4
            LIFETIME_DYNPRO_DYNPRO_LINK = 5.
    IF SY-SUBRC NE 0.
*      add your handling
    ENDIF.

*   create calls constructor, which initializes, creats and links
*    a TextEdit Control
    CREATE OBJECT G_EDITOR_1
      EXPORTING
         PARENT = G_EDITOR_CONTAINER_1
         WORDWRAP_MODE = CL_GUI_TEXTEDIT=&amp;gt;WORDWRAP_AT_FIXED_POSITION
         WORDWRAP_TO_LINEBREAK_MODE = CL_GUI_TEXTEDIT=&amp;gt;TRUE
         WORDWRAP_POSITION          = 65
      EXCEPTIONS
          OTHERS = 1.
    IF SY-SUBRC NE 0.
      CALL FUNCTION 'POPUP_TO_INFORM'
        EXPORTING
          TITEL = G_REPID
          TXT2  = SPACE
          TXT1  = TEXT-001.
    ENDIF.

    CREATE OBJECT G_EDITOR_2
      EXPORTING
         PARENT = G_EDITOR_CONTAINER_2
         WORDWRAP_MODE = CL_GUI_TEXTEDIT=&amp;gt;WORDWRAP_AT_FIXED_POSITION
         WORDWRAP_TO_LINEBREAK_MODE = CL_GUI_TEXTEDIT=&amp;gt;TRUE
         WORDWRAP_POSITION          = 65
      EXCEPTIONS
          OTHERS = 1.
    IF SY-SUBRC NE 0.
      CALL FUNCTION 'POPUP_TO_INFORM'
        EXPORTING
          TITEL = G_REPID
          TXT2  = SPACE
          TXT1  = TEXT-001.
    ENDIF.

    CREATE OBJECT G_EDITOR_5
      EXPORTING
         PARENT = G_EDITOR_CONTAINER_5
         WORDWRAP_MODE = CL_GUI_TEXTEDIT=&amp;gt;WORDWRAP_AT_FIXED_POSITION
         WORDWRAP_TO_LINEBREAK_MODE = CL_GUI_TEXTEDIT=&amp;gt;TRUE
         WORDWRAP_POSITION          = 65
      EXCEPTIONS
          OTHERS = 1.
    IF SY-SUBRC NE 0.
      CALL FUNCTION 'POPUP_TO_INFORM'
        EXPORTING
          TITEL = G_REPID
          TXT2  = SPACE
          TXT1  = TEXT-001.
    ENDIF.

  ENDIF.


   IF PARTICIPANTS = 'X'.

    CALL METHOD G_EDITOR_1-&amp;gt;SET_READONLY_MODE
        EXPORTING
          READONLY_MODE          = '1'
        EXCEPTIONS
          ERROR_CNTL_CALL_METHOD = 1
          INVALID_PARAMETER      = 2
          OTHERS                 = 3.
      IF SY-SUBRC &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2009 09:07:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-textedit-refresh-problem/m-p/6244176#M1382574</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-15T09:07:56Z</dc:date>
    </item>
    <item>
      <title>Re: CL_GUI_TEXTEDIT refresh problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-textedit-refresh-problem/m-p/6244177#M1382575</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;Please indent your post and use formating so that it is readable and understandable&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2009 09:15:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-textedit-refresh-problem/m-p/6244177#M1382575</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-15T09:15:31Z</dc:date>
    </item>
  </channel>
</rss>

