<?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: SET_HANDLER_HOBJ_NULL in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-handler-hobj-null/m-p/4830408#M1130159</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Naimesh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for this correction. You are right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Nov 2008 22:45:21 GMT</pubDate>
    <dc:creator>uwe_schieferstein</dc:creator>
    <dc:date>2008-11-24T22:45:21Z</dc:date>
    <item>
      <title>SET_HANDLER_HOBJ_NULL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-handler-hobj-null/m-p/4830405#M1130156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;unfortunately I am all at sea. I always get this dump. I know that I have forget something but I don't know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here my coding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CLASS lcl_event_tree DEFINITION.

  PUBLIC SECTION.
    METHODS:
      handle_expand_no_children
                          FOR EVENT expand_no_children
                          OF cl_gui_simple_tree
                          IMPORTING node_key.

ENDCLASS.                    "lcl_event_tree DEFINITION


CLASS lcl_event_tree IMPLEMENTATION.

  METHOD handle_expand_no_children.

    DATA: node_table TYPE node_table_type,
          node TYPE ztreenode.

    G_EVENT = 'EXPAND_NO_CHILDREN'.

    IF node_key = 'Child1'.
* add two nodes to the tree control (the children of 'Child1')

* Node with key 'New1'
      CLEAR node.
      node-node_key = c_nodekey-new1.
      node-relatkey = c_nodekey-child1.
      node-relatship = cl_gui_simple_tree=&amp;gt;relat_last_child.
      node-isfolder = ' '.
      node-text = 'New1'(ne1).
      APPEND node TO node_table.

* Node with key 'New2'
      CLEAR node.
      node-node_key = c_nodekey-new2.
      node-relatkey = c_nodekey-child1.
      node-relatship = cl_gui_simple_tree=&amp;gt;relat_last_child.
      node-n_image = '@10@'.
      node-expander = ' '.
      node-text = 'New2'(ne2).
      APPEND node TO node_table.

      CALL METHOD g_tree-&amp;gt;add_nodes
        EXPORTING
          table_structure_name           = 'ZTREENODE'
          node_table                     = node_table
        EXCEPTIONS
          failed                         = 1
          error_in_node_table            = 2
          dp_error                       = 3
          table_structure_name_not_found = 4
          OTHERS                         = 5.
      IF sy-subrc &amp;lt;&amp;gt; 0.

      ENDIF.
    ENDIF.
  ENDMETHOD.                    "handle_expand_no_children
ENDCLASS.                    "lcl_event_tree IMPLEMENTATION
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* create a container for the tree control
  CREATE OBJECT g_custom_container
    EXPORTING      " the container is linked to the custom control with the
          " name 'TREE_CONTAINER' on the dynpro
      container_name              = 'CONTAINER'
    EXCEPTIONS
      cntl_error                  = 1
      cntl_system_error           = 2
      create_error                = 3
      lifetime_error              = 4
      lifetime_dynpro_dynpro_link = 5.
  IF sy-subrc &amp;lt;&amp;gt; 0.

  ENDIF.

* create a tree control
  CREATE OBJECT g_tree
    EXPORTING
      parent                      = container_1_2
      node_selection_mode         = cl_gui_simple_tree=&amp;gt;node_sel_mode_single
    EXCEPTIONS
      lifetime_error              = 1
      cntl_system_error           = 2
      create_error                = 3
      failed                      = 4
      illegal_node_selection_mode = 5.
  IF sy-subrc &amp;lt;&amp;gt; 0.

  ENDIF.

  SET HANDLER gr_event_tree-&amp;gt;handle_expand_no_children FOR g_tree.

  PERFORM build_node_table USING node_table.

  CALL METHOD g_tree-&amp;gt;add_nodes
    EXPORTING
      table_structure_name           = 'ZTREENODE'
      node_table                     = node_table
    EXCEPTIONS
      failed                         = 1
      error_in_node_table            = 2
      dp_error                       = 3
      table_structure_name_not_found = 4
      OTHERS                         = 5.
  IF sy-subrc &amp;lt;&amp;gt; 0.

  ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2008 17:02:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-handler-hobj-null/m-p/4830405#M1130156</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-24T17:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: SET_HANDLER_HOBJ_NULL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-handler-hobj-null/m-p/4830406#M1130157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are two ways to get rid of the ABAPdump.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(1) Create the instance of your event handler class&lt;/P&gt;&lt;P&gt;(2) Define your event handler method as static method&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
...
" Event handler method is an instance method so we should create the instance before we call the method
CREATE OBJECT gr_event_tree.
SET HANDLER gr_event_tree-&amp;gt;handle_expand_no_children FOR g_tree.

...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CLASS lcl_event_tree DEFINITION.
 
  PUBLIC SECTION.
    "METHODS:
    CLASS-METHODS:
      handle_expand_no_children
                          FOR EVENT expand_no_children
                          OF cl_gui_simple_tree
                          IMPORTING node_key.  " static method
 
ENDCLASS.                    "lcl_event_tree DEFINITION


...
SET HANDLER gr_event_tree=&amp;gt;handle_expand_no_children FOR g_tree.
...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2008 21:06:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-handler-hobj-null/m-p/4830406#M1130157</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2008-11-24T21:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: SET_HANDLER_HOBJ_NULL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-handler-hobj-null/m-p/4830407#M1130158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you define the Static method, use the classname and method, not the object reference and method:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SET HANDLER lcl_event_tree=&amp;gt;handle_expand_no_children FOR g_tree.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess, Uwe made typo on this statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2008 21:33:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-handler-hobj-null/m-p/4830407#M1130158</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2008-11-24T21:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: SET_HANDLER_HOBJ_NULL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-handler-hobj-null/m-p/4830408#M1130159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Naimesh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for this correction. You are right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Nov 2008 22:45:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-handler-hobj-null/m-p/4830408#M1130159</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2008-11-24T22:45:21Z</dc:date>
    </item>
    <item>
      <title>Re: SET_HANDLER_HOBJ_NULL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-handler-hobj-null/m-p/4830409#M1130160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2008 15:25:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-handler-hobj-null/m-p/4830409#M1130160</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-25T15:25:01Z</dc:date>
    </item>
  </channel>
</rss>

