<?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 OBJECT_OBJREF_NOT_ASSIGNED for Text editor in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/object-objref-not-assigned-for-text-editor/m-p/3729616#M897678</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We tried to use Text editor on a Screen which is RF enabled. It is working fine when we work in SAP. When this is being connected from LM01 the below error message is coming. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Runtime error: OBJECT_OBJREF_NOT_ASSIGNED&lt;/P&gt;&lt;P&gt;Exception: CX_SY_REF_INITIAL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code: &lt;/P&gt;&lt;P&gt;  IF g_editor IS INITIAL.&lt;/P&gt;&lt;P&gt;*-- Create custom Container&lt;/P&gt;&lt;P&gt;    CREATE OBJECT g_editor_container&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        container_name              = 'EDITOR'&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;        OTHERS                      = 6&lt;/P&gt;&lt;P&gt;        .&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-- Create  Text Editor&lt;/P&gt;&lt;P&gt;    CREATE OBJECT g_editor&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;      style                  = 0&lt;/P&gt;&lt;P&gt;      max_number_chars       = 28&lt;/P&gt;&lt;P&gt;      wordwrap_mode          = 2&lt;/P&gt;&lt;P&gt;      wordwrap_position      = 14&lt;/P&gt;&lt;P&gt;      wordwrap_to_linebreak_mode = cl_gui_textedit=&amp;gt;false&lt;/P&gt;&lt;P&gt;      parent                 = g_editor_container&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        error_cntl_create      = 1&lt;/P&gt;&lt;P&gt;        error_cntl_init        = 2&lt;/P&gt;&lt;P&gt;        error_cntl_link        = 3&lt;/P&gt;&lt;P&gt;        error_dp_create        = 4&lt;/P&gt;&lt;P&gt;        gui_type_not_supported = 5&lt;/P&gt;&lt;P&gt;        OTHERS                 = 6&lt;/P&gt;&lt;P&gt;        .&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-- Remove text editor toolbar&lt;/P&gt;&lt;P&gt;    CALL METHOD g_editor-&amp;gt;set_toolbar_mode&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        toolbar_mode           = cl_gui_textedit=&amp;gt;false&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        error_cntl_call_method = 1&lt;/P&gt;&lt;P&gt;        invalid_parameter      = 2&lt;/P&gt;&lt;P&gt;        OTHERS                 = 3.&lt;/P&gt;&lt;P&gt;*--Remove text editor status bar&lt;/P&gt;&lt;P&gt;    CALL METHOD g_editor-&amp;gt;set_statusbar_mode&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        statusbar_mode         = cl_gui_textedit=&amp;gt;false&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        error_cntl_call_method = 1&lt;/P&gt;&lt;P&gt;        invalid_parameter      = 2&lt;/P&gt;&lt;P&gt;        OTHERS                 = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone please suggest what is missing here. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;NKumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 May 2008 14:56:10 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-01T14:56:10Z</dc:date>
    <item>
      <title>OBJECT_OBJREF_NOT_ASSIGNED for Text editor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/object-objref-not-assigned-for-text-editor/m-p/3729616#M897678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We tried to use Text editor on a Screen which is RF enabled. It is working fine when we work in SAP. When this is being connected from LM01 the below error message is coming. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Runtime error: OBJECT_OBJREF_NOT_ASSIGNED&lt;/P&gt;&lt;P&gt;Exception: CX_SY_REF_INITIAL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code: &lt;/P&gt;&lt;P&gt;  IF g_editor IS INITIAL.&lt;/P&gt;&lt;P&gt;*-- Create custom Container&lt;/P&gt;&lt;P&gt;    CREATE OBJECT g_editor_container&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        container_name              = 'EDITOR'&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;        OTHERS                      = 6&lt;/P&gt;&lt;P&gt;        .&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-- Create  Text Editor&lt;/P&gt;&lt;P&gt;    CREATE OBJECT g_editor&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;      style                  = 0&lt;/P&gt;&lt;P&gt;      max_number_chars       = 28&lt;/P&gt;&lt;P&gt;      wordwrap_mode          = 2&lt;/P&gt;&lt;P&gt;      wordwrap_position      = 14&lt;/P&gt;&lt;P&gt;      wordwrap_to_linebreak_mode = cl_gui_textedit=&amp;gt;false&lt;/P&gt;&lt;P&gt;      parent                 = g_editor_container&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        error_cntl_create      = 1&lt;/P&gt;&lt;P&gt;        error_cntl_init        = 2&lt;/P&gt;&lt;P&gt;        error_cntl_link        = 3&lt;/P&gt;&lt;P&gt;        error_dp_create        = 4&lt;/P&gt;&lt;P&gt;        gui_type_not_supported = 5&lt;/P&gt;&lt;P&gt;        OTHERS                 = 6&lt;/P&gt;&lt;P&gt;        .&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-- Remove text editor toolbar&lt;/P&gt;&lt;P&gt;    CALL METHOD g_editor-&amp;gt;set_toolbar_mode&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        toolbar_mode           = cl_gui_textedit=&amp;gt;false&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        error_cntl_call_method = 1&lt;/P&gt;&lt;P&gt;        invalid_parameter      = 2&lt;/P&gt;&lt;P&gt;        OTHERS                 = 3.&lt;/P&gt;&lt;P&gt;*--Remove text editor status bar&lt;/P&gt;&lt;P&gt;    CALL METHOD g_editor-&amp;gt;set_statusbar_mode&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        statusbar_mode         = cl_gui_textedit=&amp;gt;false&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        error_cntl_call_method = 1&lt;/P&gt;&lt;P&gt;        invalid_parameter      = 2&lt;/P&gt;&lt;P&gt;        OTHERS                 = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone please suggest what is missing here. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;NKumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 May 2008 14:56:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/object-objref-not-assigned-for-text-editor/m-p/3729616#M897678</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-01T14:56:10Z</dc:date>
    </item>
    <item>
      <title>Re: OBJECT_OBJREF_NOT_ASSIGNED for Text editor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/object-objref-not-assigned-for-text-editor/m-p/3729617#M897679</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;Looking at the code the problem seems to be at:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;==============&lt;/P&gt;&lt;P&gt;IF g_editor IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create custom Container &lt;/P&gt;&lt;P&gt;CREATE OBJECT g_editor_container&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;container_name = 'EDITOR'&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;OTHERS = 6&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;IF sy-subrc 0.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create Text Editor &lt;/P&gt;&lt;P&gt;CREATE OBJECT g_editor&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;style = 0&lt;/P&gt;&lt;P&gt;max_number_chars = 28&lt;/P&gt;&lt;P&gt;wordwrap_mode = 2&lt;/P&gt;&lt;P&gt;wordwrap_position = 14&lt;/P&gt;&lt;P&gt;wordwrap_to_linebreak_mode = cl_gui_textedit=&amp;gt;false&lt;/P&gt;&lt;P&gt;parent = g_editor_container&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;error_cntl_create = 1&lt;/P&gt;&lt;P&gt;error_cntl_init = 2&lt;/P&gt;&lt;P&gt;error_cntl_link = 3&lt;/P&gt;&lt;P&gt;error_dp_create = 4&lt;/P&gt;&lt;P&gt;gui_type_not_supported = 5&lt;/P&gt;&lt;P&gt;OTHERS = 6&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;IF sy-subrc 0.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remove text editor toolbar &lt;/P&gt;&lt;P&gt;CALL METHOD g_editor-&amp;gt;set_toolbar_mode   " This point&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;toolbar_mode = cl_gui_textedit=&amp;gt;false&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;error_cntl_call_method = 1&lt;/P&gt;&lt;P&gt;invalid_parameter = 2&lt;/P&gt;&lt;P&gt;OTHERS = 3.&lt;/P&gt;&lt;P&gt;*--Remove text editor status bar&lt;/P&gt;&lt;P&gt;CALL METHOD g_editor-&amp;gt;set_statusbar_mode   " This point&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;statusbar_mode = cl_gui_textedit=&amp;gt;false&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;error_cntl_call_method = 1&lt;/P&gt;&lt;P&gt;invalid_parameter = 2&lt;/P&gt;&lt;P&gt;OTHERS = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;===============&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are creating the object "g_editor" and catching the exception. I think create object for g_editor is failing and since you are not checking this it is causing the problem. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can fix the code as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=====&lt;/P&gt;&lt;P&gt;IF g_editor IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create custom Container &lt;/P&gt;&lt;P&gt;CREATE OBJECT g_editor_container&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;container_name = 'EDITOR'&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;OTHERS = 6&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;IF sy-subrc 0.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create Text Editor &lt;/P&gt;&lt;P&gt;CREATE OBJECT g_editor&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;style = 0&lt;/P&gt;&lt;P&gt;max_number_chars = 28&lt;/P&gt;&lt;P&gt;wordwrap_mode = 2&lt;/P&gt;&lt;P&gt;wordwrap_position = 14&lt;/P&gt;&lt;P&gt;wordwrap_to_linebreak_mode = cl_gui_textedit=&amp;gt;false&lt;/P&gt;&lt;P&gt;parent = g_editor_container&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;error_cntl_create = 1&lt;/P&gt;&lt;P&gt;error_cntl_init = 2&lt;/P&gt;&lt;P&gt;error_cntl_link = 3&lt;/P&gt;&lt;P&gt;error_dp_create = 4&lt;/P&gt;&lt;P&gt;gui_type_not_supported = 5&lt;/P&gt;&lt;P&gt;OTHERS = 6&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;IF sy-subrc 0.         -&lt;/P&gt;&lt;HR originaltext="-----" /&gt;&lt;P&gt;&amp;gt; put the below code under this if. That means the code is executed only &lt;/P&gt;&lt;P&gt;                                      if g_editor is created.&lt;/P&gt;&lt;P&gt;Remove text editor toolbar &lt;/P&gt;&lt;P&gt;CALL METHOD g_editor-&amp;gt;set_toolbar_mode   " This point&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;toolbar_mode = cl_gui_textedit=&amp;gt;false&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;error_cntl_call_method = 1&lt;/P&gt;&lt;P&gt;invalid_parameter = 2&lt;/P&gt;&lt;P&gt;OTHERS = 3.&lt;/P&gt;&lt;P&gt;*--Remove text editor status bar&lt;/P&gt;&lt;P&gt;CALL METHOD g_editor-&amp;gt;set_statusbar_mode   " This point&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;statusbar_mode = cl_gui_textedit=&amp;gt;false&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;error_cntl_call_method = 1&lt;/P&gt;&lt;P&gt;invalid_parameter = 2&lt;/P&gt;&lt;P&gt;OTHERS = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;=====&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jun 2008 04:31:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/object-objref-not-assigned-for-text-editor/m-p/3729617#M897679</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-24T04:31:06Z</dc:date>
    </item>
  </channel>
</rss>

