<?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: add_node method in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-node-method/m-p/3662701#M882268</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ankur&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample report &lt;STRONG&gt;SAPCOLUMN_TREE_CONTROL_DEMO&lt;/STRONG&gt; shows how to build a tree using class cl_gui_column_tree. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below you see part of the coding where the tree nodes are created:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
...
* add some nodes to the tree control
* NOTE: the tree control does not store data at the backend. If an
* application wants to access tree data later, it must store the
* tree data itself.

  PERFORM BUILD_NODE_AND_ITEM_TABLE USING NODE_TABLE ITEM_TABLE.

  CALL METHOD G_TREE-&amp;gt;ADD_NODES_AND_ITEMS
    EXPORTING
      NODE_TABLE = NODE_TABLE
      ITEM_TABLE = ITEM_TABLE
      ITEM_TABLE_STRUCTURE_NAME = 'MTREEITM'
    EXCEPTIONS
      FAILED = 1
      CNTL_SYSTEM_ERROR = 3
      ERROR_IN_TABLES = 4
      DP_ERROR = 5
      TABLE_STRUCTURE_NAME_NOT_FOUND = 6.
  IF SY-SUBRC &amp;lt;&amp;gt; 0.
    MESSAGE A000.
  ENDIF.

* expand the node with key 'Root'
  CALL METHOD G_TREE-&amp;gt;EXPAND_NODE
    EXPORTING
      node_key            = c_nodekey-Root
    EXCEPTIONS
      FAILED              = 1
      ILLEGAL_LEVEL_COUNT = 2
      CNTL_SYSTEM_ERROR   = 3
      NODE_NOT_FOUND      = 4
      CANNOT_EXPAND_LEAF  = 5.
  IF SY-SUBRC &amp;lt;&amp;gt; 0.
    MESSAGE A000.
  ENDIF.


ENDFORM.                    " CREATE_AND_INIT_TREE
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems that this class does not have a method for adding a single node. Thus, use method ADD_NODES_AND_ITEMS with a single entry in the node and item itabs.&lt;/P&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>Thu, 10 Apr 2008 18:57:02 GMT</pubDate>
    <dc:creator>uwe_schieferstein</dc:creator>
    <dc:date>2008-04-10T18:57:02Z</dc:date>
    <item>
      <title>add_node method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-node-method/m-p/3662700#M882267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Expert!! &lt;/P&gt;&lt;P&gt;I need you help i am creating column tree with using my local class with reference to cl_gui_column_tree the method add_node is not in this class .As this method is present in cl_column_tree_model class.Please advice which method i can use as similarly add_node in cl_gui_column_tree. &lt;/P&gt;&lt;P&gt;Thanks in advance. &lt;/P&gt;&lt;P&gt;Ankur Garg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Apr 2008 16:29:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-node-method/m-p/3662700#M882267</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-10T16:29:42Z</dc:date>
    </item>
    <item>
      <title>Re: add_node method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-node-method/m-p/3662701#M882268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ankur&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample report &lt;STRONG&gt;SAPCOLUMN_TREE_CONTROL_DEMO&lt;/STRONG&gt; shows how to build a tree using class cl_gui_column_tree. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below you see part of the coding where the tree nodes are created:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
...
* add some nodes to the tree control
* NOTE: the tree control does not store data at the backend. If an
* application wants to access tree data later, it must store the
* tree data itself.

  PERFORM BUILD_NODE_AND_ITEM_TABLE USING NODE_TABLE ITEM_TABLE.

  CALL METHOD G_TREE-&amp;gt;ADD_NODES_AND_ITEMS
    EXPORTING
      NODE_TABLE = NODE_TABLE
      ITEM_TABLE = ITEM_TABLE
      ITEM_TABLE_STRUCTURE_NAME = 'MTREEITM'
    EXCEPTIONS
      FAILED = 1
      CNTL_SYSTEM_ERROR = 3
      ERROR_IN_TABLES = 4
      DP_ERROR = 5
      TABLE_STRUCTURE_NAME_NOT_FOUND = 6.
  IF SY-SUBRC &amp;lt;&amp;gt; 0.
    MESSAGE A000.
  ENDIF.

* expand the node with key 'Root'
  CALL METHOD G_TREE-&amp;gt;EXPAND_NODE
    EXPORTING
      node_key            = c_nodekey-Root
    EXCEPTIONS
      FAILED              = 1
      ILLEGAL_LEVEL_COUNT = 2
      CNTL_SYSTEM_ERROR   = 3
      NODE_NOT_FOUND      = 4
      CANNOT_EXPAND_LEAF  = 5.
  IF SY-SUBRC &amp;lt;&amp;gt; 0.
    MESSAGE A000.
  ENDIF.


ENDFORM.                    " CREATE_AND_INIT_TREE
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems that this class does not have a method for adding a single node. Thus, use method ADD_NODES_AND_ITEMS with a single entry in the node and item itabs.&lt;/P&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>Thu, 10 Apr 2008 18:57:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-node-method/m-p/3662701#M882268</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2008-04-10T18:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: add_node method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/add-node-method/m-p/3662702#M882269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ankur,&lt;/P&gt;&lt;P&gt;Add_method is not present in cl_gui_column_tree you  can use cl_column_tree_model for add_method method.&lt;/P&gt;&lt;P&gt;Please reward if helpfull.&lt;/P&gt;&lt;P&gt;Amit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Jun 2008 07:21:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/add-node-method/m-p/3662702#M882269</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-01T07:21:30Z</dc:date>
    </item>
  </channel>
</rss>

