<?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 adding new node to alv tree in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/adding-new-node-to-alv-tree/m-p/7012836#M1496966</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi i am new to ABAP and trying to build ALV TREE.But i couldn't get code pasted below.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 data: lt_item_layout type lvc_t_layi,
        ls_item_layout type lvc_s_layi.
  ls_item_layout-t_image = '@3P@'.
  ls_item_layout-fieldname = tree1-&amp;gt;c_hierarchy_column_name.
  ls_item_layout-style   =
                        cl_gui_column_tree=&amp;gt;style_intensifd_critical.
  append ls_item_layout to lt_item_layout.

* add node
  l_node_text =  ps_sflight-carrid.

  data: ls_node type lvc_s_layn.
  ls_node-n_image   = space.
  ls_node-exp_image = space.

 * call method tree1-&amp;gt;add_node
    exporting
      i_relat_node_key = p_relat_key
      i_relationship   = cl_gui_column_tree=&amp;gt;relat_last_child
      i_node_text      = l_node_text
      is_outtab_line   = ls_sflight
      is_node_layout   = ls_node
      it_item_layout   = lt_item_layout
    importing
      e_new_node_key   = p_node_key.*
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the above can any one please explain about method &lt;STRONG&gt;add_node&lt;/STRONG&gt;  with parameters and where we are telling reletion between root and parent node.Also,explain what is field p_node_key which is node's key???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 May 2010 13:21:59 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-05-26T13:21:59Z</dc:date>
    <item>
      <title>adding new node to alv tree</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/adding-new-node-to-alv-tree/m-p/7012836#M1496966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi i am new to ABAP and trying to build ALV TREE.But i couldn't get code pasted below.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
 data: lt_item_layout type lvc_t_layi,
        ls_item_layout type lvc_s_layi.
  ls_item_layout-t_image = '@3P@'.
  ls_item_layout-fieldname = tree1-&amp;gt;c_hierarchy_column_name.
  ls_item_layout-style   =
                        cl_gui_column_tree=&amp;gt;style_intensifd_critical.
  append ls_item_layout to lt_item_layout.

* add node
  l_node_text =  ps_sflight-carrid.

  data: ls_node type lvc_s_layn.
  ls_node-n_image   = space.
  ls_node-exp_image = space.

 * call method tree1-&amp;gt;add_node
    exporting
      i_relat_node_key = p_relat_key
      i_relationship   = cl_gui_column_tree=&amp;gt;relat_last_child
      i_node_text      = l_node_text
      is_outtab_line   = ls_sflight
      is_node_layout   = ls_node
      it_item_layout   = lt_item_layout
    importing
      e_new_node_key   = p_node_key.*
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the above can any one please explain about method &lt;STRONG&gt;add_node&lt;/STRONG&gt;  with parameters and where we are telling reletion between root and parent node.Also,explain what is field p_node_key which is node's key???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 May 2010 13:21:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/adding-new-node-to-alv-tree/m-p/7012836#M1496966</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-26T13:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: adding new node to alv tree</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/adding-new-node-to-alv-tree/m-p/7012837#M1496967</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;You can check sample below to get more details about add_note method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;node_key_root = p_adir.
CLEAR item_table.
CLEAR item.
item-item_name = 'FOLDER'.
item-class = cl_column_tree_model=&amp;gt;item_class_text.
item-text = p_adir .
APPEND item TO item_table.
item-item_name = 'LOCATION'.
item-class = cl_column_tree_model=&amp;gt;item_class_text.
item-text = 'Root' .
APPEND item TO item_table.
isfolder_flag = c_x.
expander_flag = c_x.
CALL METHOD acol_treem-&amp;gt;add_node
EXPORTING
node_key = node_key_root
isfolder = isfolder_flag
expander = expander_flag
item_table = item_table.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, please check PDF file in [Column tree model|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2ec457c4-0a01-0010-2bbc-c6e03a4a03d2?quicklink=index&amp;amp;overridelayout=true] where contins more examples and documentation about this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;Carlos Machado&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 May 2010 13:28:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/adding-new-node-to-alv-tree/m-p/7012837#M1496967</guid>
      <dc:creator>former_member214857</dc:creator>
      <dc:date>2010-05-26T13:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: adding new node to alv tree</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/adding-new-node-to-alv-tree/m-p/7012838#M1496968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kishore,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'e_new_node_key'  is the key you'll get when you will create a node.. and if you want to create child to this node you will have to pass the value returned in 'p_node_key' as i_relat_node_key value in next node.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;call method tree1-&amp;gt;add_node
    exporting
      i_relat_node_key = ' '
      i_relationship   = cl_gui_column_tree=&amp;gt;relat_last_child
      i_node_text      = l_node_text
      is_outtab_line   = ls_sflight
      is_node_layout   = ls_node
      it_item_layout   = lt_item_layout
    importing
      e_new_node_key   = p_node_key.

call method tree1-&amp;gt;add_node
    exporting
      i_relat_node_key = p_node_key.
      i_relationship   = cl_gui_column_tree=&amp;gt;relat_last_child
      i_node_text      = l_node_text
      is_outtab_line   = ls_sflight
      is_node_layout   = ls_node
      it_item_layout   = lt_item_layout
    importing
      e_new_node_key   = p_node_key.*&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 May 2010 13:30:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/adding-new-node-to-alv-tree/m-p/7012838#M1496968</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-26T13:30:57Z</dc:date>
    </item>
  </channel>
</rss>

