<?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: SALV Tree Issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/salv-tree-issue/m-p/2823403#M660518</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any takers?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Sep 2007 14:48:04 GMT</pubDate>
    <dc:creator>former_member194669</dc:creator>
    <dc:date>2007-09-21T14:48:04Z</dc:date>
    <item>
      <title>SALV Tree Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/salv-tree-issue/m-p/2823402#M660517</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;I am using SALV tree in a docking container , This is my problem&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Currently tree displayed this way 

TIC Data       | Version | Docno |
B                 04        1000 
  5QY02           04        1000 
     **           04        1000
R                 01        1001 
  003JH           01        1001  
     **           01        1001
     **           XX        1001

" i want the tree to be displayed like this way

TIC Data       | Docno |
B                1000 
  5QY02          1000 
     ** 04       1000

R                1001 
  003JH          1001  
     ** 01       1001
     ** xx       1001

" Here ** are the small page ICONs as displayed as last node
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following is the code for creating the nodes&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
* Form f_add_dcode_line                                                *
*&amp;amp;---------------------------------------------------------------------*
* This will build node for designcode                                  *
*----------------------------------------------------------------------*
form f_add_dcode_line  using    p_ls_data type ylactctic
                               p_key
                      changing p_l_dcode_key.
  data: nodes type ref to cl_salv_nodes,
        node type ref to cl_salv_node,
        text type lvc_value,
        item type ref to cl_salv_item.
  nodes = grt_tree-&amp;gt;get_nodes( ).
  try.
      node = nodes-&amp;gt;add_node( related_node = p_key
                              relationship =
   cl_gui_column_tree=&amp;gt;relat_last_child ).
      text = p_ls_data-designcode.
      node-&amp;gt;set_text( text ).
      node-&amp;gt;set_data_row( p_ls_data ).
      item = node-&amp;gt;get_hierarchy_item( ).
      item-&amp;gt;set_type( if_salv_c_item_type=&amp;gt;link ).
      item = node-&amp;gt;get_item( 'DESIGNCODE' ).
      item-&amp;gt;set_type( if_salv_c_item_type=&amp;gt;button ).
      p_l_dcode_key = node-&amp;gt;get_key( ).
    catch cx_salv_msg.
  endtry.
endform.                                 " F_add_dcode_line
*
*&amp;amp;---------------------------------------------------------------------*
* Form f_add_tcode_line                                                *
*&amp;amp;---------------------------------------------------------------------*
* This will build node for TIC code                                    *
*----------------------------------------------------------------------*
form f_add_tcode_line using    p_ls_data type ylactctic
                               p_l_dcode_key
                      changing p_l_tcode_key.
  data: nodes type ref to cl_salv_nodes,
        node type ref to cl_salv_node,
        text type lvc_value.
  nodes = grt_tree-&amp;gt;get_nodes( ).
  try.
      text = p_ls_data-ticcode.
      node = nodes-&amp;gt;add_node( related_node = p_l_dcode_key
                              data_row     = p_ls_data
                              text         = text
                              relationship =
   cl_gui_column_tree=&amp;gt;relat_last_child ).
      p_l_tcode_key = node-&amp;gt;get_key( ).
    catch cx_salv_msg.
  endtry.
endform.                                 " F_add_tcode_line
*
*&amp;amp;---------------------------------------------------------------------*
* Form f_add_tvers_line                                                *
*&amp;amp;---------------------------------------------------------------------*
* This will build node for TIC code                                    *
*----------------------------------------------------------------------*
form f_add_tvers_line  using    p_ls_data type ylactctic
                                p_l_tcode_key
                       changing p_l_tvers_key.

  data: nodes type ref to cl_salv_nodes,
        node type ref to cl_salv_node.
  nodes = grt_tree-&amp;gt;get_nodes( ).
  try.
      node = nodes-&amp;gt;add_node( related_node = p_l_tcode_key
                          data_row     = p_ls_data
         relationship = cl_gui_column_tree=&amp;gt;relat_last_child ).
      p_l_tvers_key = node-&amp;gt;get_key( ).
    catch cx_salv_msg.
  endtry.

endform.                                 " F_add_tvers_line
*
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help will be appreciated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2007 14:13:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/salv-tree-issue/m-p/2823402#M660517</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2007-09-21T14:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: SALV Tree Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/salv-tree-issue/m-p/2823403#M660518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any takers?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2007 14:48:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/salv-tree-issue/m-p/2823403#M660518</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2007-09-21T14:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: SALV Tree Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/salv-tree-issue/m-p/2823404#M660519</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;I solved myself.&lt;/P&gt;&lt;P&gt;Here is the modified code . While creating last node we have to pass the value along with relationship for CHILD.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  v_text = p_ls_data-ticversion.
  try.
      node = nodes-&amp;gt;add_node( related_node = p_l_tcode_key
                          data_row     = p_ls_data
                          text         = v_text "&amp;lt;&amp;lt;&amp;lt; -------
         relationship = cl_gui_column_tree=&amp;gt;relat_last_child ).
      p_l_tvers_key = node-&amp;gt;get_key( ).
    catch cx_salv_msg.
  endtry.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2007 14:54:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/salv-tree-issue/m-p/2823404#M660519</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2007-09-21T14:54:33Z</dc:date>
    </item>
  </channel>
</rss>

