<?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 Quick Qu: Expand_nodes method in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/quick-qu-expand-nodes-method/m-p/1825522#M352277</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to code for expand all and collapse all a tree on a dynpro.  Collapsing is fine, but I'm getting a 'MESSAGE_TYPE_X' runtime error when I call the expand_nodes method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using button on a Gui status called 'EXPANDA', and incoporated the following code in the PAI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    WHEN 'EXPANDA'.
* Expand All Trees

      CLEAR g_node_key_table.
      LOOP AT it_node_table INTO wa_node_area.
        APPEND wa_node_area-node_key TO g_node_key_table.
      ENDLOOP.
      CALL METHOD g_tree-&amp;gt;expand_nodes
        EXPORTING
          node_key_table = g_node_key_table.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;G_TREE has a type ref to CL_GUI_LIST_TREE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the past, this error message has meant that I don't have the table with the node list correct - and in this instance, a significant number of the nodes are flagged as hidden.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore, my first question is - should the list of nodes being passed in be the complete node list (including hidden nodes), or only those nodes that are not hidden, as these will be the only ones that I want to expand.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or am I missing something else?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stephen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Jan 2007 06:53:37 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-01-18T06:53:37Z</dc:date>
    <item>
      <title>Quick Qu: Expand_nodes method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/quick-qu-expand-nodes-method/m-p/1825522#M352277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to code for expand all and collapse all a tree on a dynpro.  Collapsing is fine, but I'm getting a 'MESSAGE_TYPE_X' runtime error when I call the expand_nodes method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using button on a Gui status called 'EXPANDA', and incoporated the following code in the PAI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    WHEN 'EXPANDA'.
* Expand All Trees

      CLEAR g_node_key_table.
      LOOP AT it_node_table INTO wa_node_area.
        APPEND wa_node_area-node_key TO g_node_key_table.
      ENDLOOP.
      CALL METHOD g_tree-&amp;gt;expand_nodes
        EXPORTING
          node_key_table = g_node_key_table.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;G_TREE has a type ref to CL_GUI_LIST_TREE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the past, this error message has meant that I don't have the table with the node list correct - and in this instance, a significant number of the nodes are flagged as hidden.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore, my first question is - should the list of nodes being passed in be the complete node list (including hidden nodes), or only those nodes that are not hidden, as these will be the only ones that I want to expand.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or am I missing something else?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stephen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jan 2007 06:53:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/quick-qu-expand-nodes-method/m-p/1825522#M352277</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-18T06:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: Quick Qu: Expand_nodes method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/quick-qu-expand-nodes-method/m-p/1825523#M352278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Resolved internally.  The trick is to only pass through the parent nodes - the methods did not know how to deal with the children, as they were not expandable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jan 2007 02:16:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/quick-qu-expand-nodes-method/m-p/1825523#M352278</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-22T02:16:26Z</dc:date>
    </item>
  </channel>
</rss>

