<?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: ALV Tree in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-tree/m-p/2717298#M630284</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;Please try program 'SAPSIMPLE_TREE_CONTROL_DEMO', sample program of tree controls.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_TREE_01 ALV tree control: build up the hierarchy tree&lt;/P&gt;&lt;P&gt;BCALV_TREE_02 ALV tree control: event handling&lt;/P&gt;&lt;P&gt;BCALV_TREE_03 ALV tree control: use an own context menu&lt;/P&gt;&lt;P&gt;BCALV_TREE_04 ALV tree control: add a button to the toolbar&lt;/P&gt;&lt;P&gt;BCALV_TREE_05 ALV tree control: add a menu to the toolbar&lt;/P&gt;&lt;P&gt;BCALV_TREE_06 ALV tree control: Icon column and icon for nodes/items&lt;/P&gt;&lt;P&gt;BCALV_TREE_DEMO Demo for ALV tree control&lt;/P&gt;&lt;P&gt;BCALV_TREE_DND ALV tree control: Drag &amp;amp; Drop within a hierarchy tree&lt;/P&gt;&lt;P&gt;BCALV_TREE_DND_MULTIPLE ALV tree control: Drag &amp;amp; Drop within a hierarchy tree&lt;/P&gt;&lt;P&gt;BCALV_GRID_DND_TREE ALV Grid: Drag and Drop with ALV Tree&lt;/P&gt;&lt;P&gt;BCALV_GRID_DND_TREE_SIMPLE ALV GRID: Drag and drop with ALV tree (simple)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;B&gt;here's a piece of code:&lt;/B&gt;&lt;/U&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

add 1 to childnr.
concatenate 'child' childnr into childname.
NODE-NODE_KEY = childname.
NODE-ISFOLDER = 'X'.
NODE-EXPANDER = 'X'.
ITEM-NODE_KEY = childname.
move childname to vtab-childname.

add 1 to dateinr.
NODE-NODE_KEY = dateinr.
ITEM-NODE_KEY = node-node_key.
move dateinr to vtab-childname.
modify vtab from wa.
APPEND ITEM TO ITEM_TABLE.
APPEND NODE TO NODE_TABLE.
*Datum
clear item.
ITEM-NODE_KEY = NODE-NODE_KEY.
ITEM-ITEM_NAME = '2'.
ITEM-CLASS = CL_GUI_LIST_TREE=&amp;gt;ITEM_CLASS_TEXT.
ITEM-LENGTH = 10.
ITEM-USEBGCOLOR = 'X'.
ITEM-TEXT = vtab-datum.
APPEND ITEM TO ITEM_TABLE.
*Größe
clear item.
ITEM-NODE_KEY = NODE-NODE_KEY.
ITEM-ITEM_NAME = '3'.
ITEM-CLASS = CL_GUI_LIST_TREE=&amp;gt;ITEM_CLASS_TEXT.
ITEM-LENGTH = 10.
ITEM-USEBGCOLOR = 'X'.
ITEM-TEXT = vtab-len.
APPEND ITEM TO ITEM_TABLE.
*und los
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.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this link&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/a-sample-tree-programming.htm" target="test_blank"&gt;http://www.sap-img.com/abap/a-sample-tree-programming.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/reporting/alv/alvtree.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/reporting/alv/alvtree.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Reward all helpfull answers&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;Pavan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Pavan praveen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Aug 2007 07:37:24 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-10T07:37:24Z</dc:date>
    <item>
      <title>ALV Tree</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-tree/m-p/2717296#M630282</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'm looking for traffic lights to be displayed for each record in the ALV hierarchcal list.&lt;/P&gt;&lt;P&gt;Like the color should be Red,Yello,Green to indicate status of each record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using cl_gui_alv_tree for creating Hierachical list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2007 07:30:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-tree/m-p/2717296#M630282</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-10T07:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Tree</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-tree/m-p/2717297#M630283</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;Check the following program:&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;BCALV_GRID_04&amp;lt;/b&amp;gt; Illustrates the use of exceptions (lights or leds). According to the values of SFLIGHT-SEATSOCC, the lights are set to 1 (red), 2 (yellow) or 3 (green).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Hope this helps.&lt;/P&gt;&lt;P&gt;Reward if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sipra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2007 07:35:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-tree/m-p/2717297#M630283</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-10T07:35:45Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Tree</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-tree/m-p/2717298#M630284</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;Please try program 'SAPSIMPLE_TREE_CONTROL_DEMO', sample program of tree controls.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BCALV_TREE_01 ALV tree control: build up the hierarchy tree&lt;/P&gt;&lt;P&gt;BCALV_TREE_02 ALV tree control: event handling&lt;/P&gt;&lt;P&gt;BCALV_TREE_03 ALV tree control: use an own context menu&lt;/P&gt;&lt;P&gt;BCALV_TREE_04 ALV tree control: add a button to the toolbar&lt;/P&gt;&lt;P&gt;BCALV_TREE_05 ALV tree control: add a menu to the toolbar&lt;/P&gt;&lt;P&gt;BCALV_TREE_06 ALV tree control: Icon column and icon for nodes/items&lt;/P&gt;&lt;P&gt;BCALV_TREE_DEMO Demo for ALV tree control&lt;/P&gt;&lt;P&gt;BCALV_TREE_DND ALV tree control: Drag &amp;amp; Drop within a hierarchy tree&lt;/P&gt;&lt;P&gt;BCALV_TREE_DND_MULTIPLE ALV tree control: Drag &amp;amp; Drop within a hierarchy tree&lt;/P&gt;&lt;P&gt;BCALV_GRID_DND_TREE ALV Grid: Drag and Drop with ALV Tree&lt;/P&gt;&lt;P&gt;BCALV_GRID_DND_TREE_SIMPLE ALV GRID: Drag and drop with ALV tree (simple)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;B&gt;here's a piece of code:&lt;/B&gt;&lt;/U&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

add 1 to childnr.
concatenate 'child' childnr into childname.
NODE-NODE_KEY = childname.
NODE-ISFOLDER = 'X'.
NODE-EXPANDER = 'X'.
ITEM-NODE_KEY = childname.
move childname to vtab-childname.

add 1 to dateinr.
NODE-NODE_KEY = dateinr.
ITEM-NODE_KEY = node-node_key.
move dateinr to vtab-childname.
modify vtab from wa.
APPEND ITEM TO ITEM_TABLE.
APPEND NODE TO NODE_TABLE.
*Datum
clear item.
ITEM-NODE_KEY = NODE-NODE_KEY.
ITEM-ITEM_NAME = '2'.
ITEM-CLASS = CL_GUI_LIST_TREE=&amp;gt;ITEM_CLASS_TEXT.
ITEM-LENGTH = 10.
ITEM-USEBGCOLOR = 'X'.
ITEM-TEXT = vtab-datum.
APPEND ITEM TO ITEM_TABLE.
*Größe
clear item.
ITEM-NODE_KEY = NODE-NODE_KEY.
ITEM-ITEM_NAME = '3'.
ITEM-CLASS = CL_GUI_LIST_TREE=&amp;gt;ITEM_CLASS_TEXT.
ITEM-LENGTH = 10.
ITEM-USEBGCOLOR = 'X'.
ITEM-TEXT = vtab-len.
APPEND ITEM TO ITEM_TABLE.
*und los
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.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this link&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/a-sample-tree-programming.htm" target="test_blank"&gt;http://www.sap-img.com/abap/a-sample-tree-programming.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/reporting/alv/alvtree.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/reporting/alv/alvtree.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Reward all helpfull answers&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;Pavan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Pavan praveen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2007 07:37:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-tree/m-p/2717298#M630284</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-10T07:37:24Z</dc:date>
    </item>
  </channel>
</rss>

