<?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: MESSAGE MESSAGE_HANDLER is already registe in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/message-message-handler-is-already-registe/m-p/12260337#M1987010</link>
    <description>&lt;P&gt;This error happens obviously, when you are running a second time through your coding, when those objects have been created before already (You probably run your programm, return to the selection screen and run it again, without closing the screen. All global variables will still exist in this case).&lt;/P&gt;&lt;P&gt;Because the creation of an object for class /scmb/cl_message_handler also creates a static object for class /scmb/cl_controller with values that are checked against during creation, you would have to initialize the static object of class /scmb/cl_controller before hand.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Option A) &lt;BR /&gt;&lt;/STRONG&gt;Dont recreate the object if it already exists and it doesnt need to be recreated.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: gx_cancpick    TYPE REF TO /scwm/cl_cancpick_sp,
      gx_attr_hndler TYPE REF TO /scmb/cl_attribute_handler,
      gx_msg_hndler  TYPE REF TO /scmb/cl_message_handler.

IF gx_msg_hndler IS NOT BOUND.
  CREATE OBJECT gx_msg_hndler.
ENDIF.

CREATE OBJECT gx_attr_hndler.
CREATE OBJECT gx_cancpick EXPORTING io_attribute_handler = gx_attr_hndler
                                    io_message_handler = gx_msg_hndler.&amp;lt;br&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Option B) &lt;BR /&gt;&lt;/STRONG&gt;Recreate the object if it needs recreation in case it already exists.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: gx_cancpick    TYPE REF TO /scwm/cl_cancpick_sp,
      gx_attr_hndler TYPE REF TO /scmb/cl_attribute_handler,
      gx_msg_hndler  TYPE REF TO /scmb/cl_message_handler,

      gx_contrl      TYPE REF TO /scmb/cl_controller.

gx_contrl = /scmb/cl_controller=&amp;gt;get_instance( ).
IF gx_contrl IS BOUND AND gx_msg_hndler IS BOUND.
  gx_contrl-&amp;gt;initialize( io_tm = gx_msg_hndler ).
ENDIF.
CREATE OBJECT gx_msg_hndler.

CREATE OBJECT gx_attr_hndler.
CREATE OBJECT gx_cancpick EXPORTING io_attribute_handler = gx_attr_hndler
                                    io_message_handler = gx_msg_hndler.&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 29 Sep 2020 04:46:11 GMT</pubDate>
    <dc:creator>michael_piesche</dc:creator>
    <dc:date>2020-09-29T04:46:11Z</dc:date>
    <item>
      <title>MESSAGE MESSAGE_HANDLER is already registe</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/message-message-handler-is-already-registe/m-p/12260336#M1987009</link>
      <description>&lt;P&gt;Hi Expert,&lt;/P&gt;
  &lt;P&gt;When run the "CREATE OBJECT gx_msg_hndler" message MESSAGE_HANDLER is already registe,how to &lt;/P&gt;
  &lt;P&gt;deal with the error?&lt;/P&gt;
  &lt;P&gt;DATA:&lt;/P&gt;
  &lt;P&gt;gx_cancpick TYPE REF TO /scwm/cl_cancpick_sp,&lt;/P&gt;
  &lt;P&gt; gx_attr_hndler TYPE REF TO /scmb/cl_attribute_handler,&lt;BR /&gt; gx_msg_hndler TYPE REF TO /scmb/cl_message_handler.&lt;/P&gt;
  &lt;P&gt;CREATE OBJECT gx_attr_hndler.&lt;BR /&gt; CREATE OBJECT gx_msg_hndler.&lt;/P&gt;
  &lt;P&gt; CREATE OBJECT gx_cancpick&lt;BR /&gt; EXPORTING&lt;BR /&gt; io_attribute_handler = gx_attr_hndler&lt;BR /&gt; io_message_handler = gx_msg_hndler.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 03:48:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/message-message-handler-is-already-registe/m-p/12260336#M1987009</guid>
      <dc:creator>former_member660488</dc:creator>
      <dc:date>2020-09-29T03:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: MESSAGE MESSAGE_HANDLER is already registe</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/message-message-handler-is-already-registe/m-p/12260337#M1987010</link>
      <description>&lt;P&gt;This error happens obviously, when you are running a second time through your coding, when those objects have been created before already (You probably run your programm, return to the selection screen and run it again, without closing the screen. All global variables will still exist in this case).&lt;/P&gt;&lt;P&gt;Because the creation of an object for class /scmb/cl_message_handler also creates a static object for class /scmb/cl_controller with values that are checked against during creation, you would have to initialize the static object of class /scmb/cl_controller before hand.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Option A) &lt;BR /&gt;&lt;/STRONG&gt;Dont recreate the object if it already exists and it doesnt need to be recreated.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: gx_cancpick    TYPE REF TO /scwm/cl_cancpick_sp,
      gx_attr_hndler TYPE REF TO /scmb/cl_attribute_handler,
      gx_msg_hndler  TYPE REF TO /scmb/cl_message_handler.

IF gx_msg_hndler IS NOT BOUND.
  CREATE OBJECT gx_msg_hndler.
ENDIF.

CREATE OBJECT gx_attr_hndler.
CREATE OBJECT gx_cancpick EXPORTING io_attribute_handler = gx_attr_hndler
                                    io_message_handler = gx_msg_hndler.&amp;lt;br&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Option B) &lt;BR /&gt;&lt;/STRONG&gt;Recreate the object if it needs recreation in case it already exists.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: gx_cancpick    TYPE REF TO /scwm/cl_cancpick_sp,
      gx_attr_hndler TYPE REF TO /scmb/cl_attribute_handler,
      gx_msg_hndler  TYPE REF TO /scmb/cl_message_handler,

      gx_contrl      TYPE REF TO /scmb/cl_controller.

gx_contrl = /scmb/cl_controller=&amp;gt;get_instance( ).
IF gx_contrl IS BOUND AND gx_msg_hndler IS BOUND.
  gx_contrl-&amp;gt;initialize( io_tm = gx_msg_hndler ).
ENDIF.
CREATE OBJECT gx_msg_hndler.

CREATE OBJECT gx_attr_hndler.
CREATE OBJECT gx_cancpick EXPORTING io_attribute_handler = gx_attr_hndler
                                    io_message_handler = gx_msg_hndler.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 04:46:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/message-message-handler-is-already-registe/m-p/12260337#M1987010</guid>
      <dc:creator>michael_piesche</dc:creator>
      <dc:date>2020-09-29T04:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: MESSAGE MESSAGE_HANDLER is already registe</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/message-message-handler-is-already-registe/m-p/12260338#M1987011</link>
      <description>&lt;P&gt;I guess you mean the error message /SCMB/ESA_EMULATION025 "ID &amp;amp;1 is already registered at controller".&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 06:16:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/message-message-handler-is-already-registe/m-p/12260338#M1987011</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-09-29T06:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: MESSAGE MESSAGE_HANDLER is already registe</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/message-message-handler-is-already-registe/m-p/12260339#M1987012</link>
      <description>&lt;P&gt;The Option B works well,the option A is not work,Thank you so much!&lt;/P&gt;&lt;P&gt;the gx_msg_hndler is a local variable  in a perfrom,every run the object is initial.&lt;/P&gt;

&lt;P&gt;gx_contrl = /scmb/cl_controller=&amp;gt;get_instance( ).&lt;/P&gt;&lt;P&gt;
 gx_contrl-&amp;gt;initialize( io_tm = gx_msg_hndler ).&lt;BR /&gt;
&lt;BR /&gt;
 CREATE OBJECT gx_attr_hndler.&lt;BR /&gt;
 CREATE OBJECT gx_msg_hndler.&lt;BR /&gt;&lt;BR /&gt;
 CREATE OBJECT gx_cancpick&lt;BR /&gt;
 EXPORTING&lt;BR /&gt;
 io_attribute_handler = gx_attr_hndler&lt;BR /&gt;
 io_message_handler = gx_msg_hndler.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 06:58:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/message-message-handler-is-already-registe/m-p/12260339#M1987012</guid>
      <dc:creator>former_member660488</dc:creator>
      <dc:date>2020-09-29T06:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: MESSAGE MESSAGE_HANDLER is already registe</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/message-message-handler-is-already-registe/m-p/12260340#M1987013</link>
      <description>&lt;P&gt;Yes,the message number is /SCMB/ESA_EMULATION025&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 07:09:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/message-message-handler-is-already-registe/m-p/12260340#M1987013</guid>
      <dc:creator>former_member660488</dc:creator>
      <dc:date>2020-09-29T07:09:53Z</dc:date>
    </item>
  </channel>
</rss>

