<?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: Graphical Tree in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/graphical-tree/m-p/2299297#M502373</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SET PF-STATUS 'GUI_STATUS'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CALL FUNCTION 'RS_TREE_CONSTRUCT'&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            nodetab      = tr&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            tree_failure = 1&lt;/P&gt;&lt;P&gt;            OTHERS       = 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***************************************&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;FOR TREE DISPLAY&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;***************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'RS_TREE_LIST_DISPLAY'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            callback_user_command = 'TDR_USER_COMMAND'&lt;/P&gt;&lt;P&gt;            callback_gui_status   = 'GUI_STATUS'&lt;/P&gt;&lt;P&gt;            callback_program      =  report name&lt;/P&gt;&lt;P&gt;            use_control           = 'L'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 May 2007 04:55:38 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-28T04:55:38Z</dc:date>
    <item>
      <title>Graphical Tree</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/graphical-tree/m-p/2299296#M502372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Can any one send me a example of graphical tree. I want to create a report in tree view.I have used simple tree using type pools STREE and functions.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'RS_TREE_CONSTRUCT'&lt;/P&gt;&lt;P&gt;     TABLES&lt;/P&gt;&lt;P&gt;          NODETAB = ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'RS_TREE_LIST_DISPLAY'&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;          USE_CONTROL = 'L'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Rajiv singh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 May 2007 04:50:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/graphical-tree/m-p/2299296#M502372</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-28T04:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: Graphical Tree</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/graphical-tree/m-p/2299297#M502373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SET PF-STATUS 'GUI_STATUS'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CALL FUNCTION 'RS_TREE_CONSTRUCT'&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            nodetab      = tr&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            tree_failure = 1&lt;/P&gt;&lt;P&gt;            OTHERS       = 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***************************************&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;FOR TREE DISPLAY&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;***************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'RS_TREE_LIST_DISPLAY'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            callback_user_command = 'TDR_USER_COMMAND'&lt;/P&gt;&lt;P&gt;            callback_gui_status   = 'GUI_STATUS'&lt;/P&gt;&lt;P&gt;            callback_program      =  report name&lt;/P&gt;&lt;P&gt;            use_control           = 'L'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 May 2007 04:55:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/graphical-tree/m-p/2299297#M502373</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-28T04:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: Graphical Tree</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/graphical-tree/m-p/2299298#M502374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;report  zfdzj028                                .
tables: knvh.

types: begin of worktype,
         level(2),
         hkunnr like knvh-kunnr,
         kunnr  like knvh-hkunnr,
       end of worktype.

data: it_knvh type table of worktype,
      wa_knvh like line of it_knvh,
      it_temp type table of worktype,
      wa_temp like line of it_temp,
      it_work type table of worktype,
      wa_work like line of it_work.

data : begin of it_nodes occurs 0.
        include structure snodetext.
data : end of it_nodes.

constants: number_of_levels type i value 6.
parameter: p_hkunnr like knvh-hkunnr.

start-of-selection.

* Parent = 1. hierarchy node
  wa_temp-kunnr = p_hkunnr.
  append wa_temp to it_temp.
  wa_work-kunnr = wa_temp-kunnr.
  wa_work-level = 1.
  append wa_work to it_work.

* Reading customer hierarchy (max. 6 level)
  do number_of_levels times.

    check not it_temp is initial.

    select kunnr hkunnr
      from knvh
      into corresponding fields of table it_knvh
      for all entries in it_temp
      where hkunnr = it_temp-kunnr.

    loop at it_knvh into wa_knvh.
      wa_knvh-level = sy-index + 1.
      append wa_knvh to it_work.
    endloop.

    it_temp[] = it_knvh[].

  enddo.

* Hierarchy nodes -&amp;gt; tree control
  loop at it_work into wa_work where level = 1.
    perform make_node.
    loop at it_work into wa_work where level = 2 and
                                       hkunnr = wa_work-kunnr.
      perform make_node.
      loop at it_work into wa_work where level = 3 and
                                         hkunnr = wa_work-kunnr.
        perform make_node.
        loop at it_work into wa_work where level = 4 and
                                           hkunnr = wa_work-kunnr.
          perform make_node.
          loop at it_work into wa_work where level = 5 and
                                             hkunnr = wa_work-kunnr.
            perform make_node.
            loop at it_work into wa_work where level = 6 and
                                            hkunnr = wa_work-kunnr.
              perform make_node.
            endloop.
          endloop.
        endloop.
      endloop.
    endloop.
  endloop.

* Making the tree control
  call function 'RS_TREE_CONSTRUCT'
    tables
      nodetab      = it_nodes
    exceptions
      tree_failure = 1.

* Display the tree control
  data : f15 type c.
  call function 'RS_TREE_LIST_DISPLAY'
    exporting
      callback_program = sy-repid
    importing
      f15              = f15.


*&amp;amp;--------------------------------------------------------------------*
*&amp;amp;      Form  MAKE_NODE
*&amp;amp;--------------------------------------------------------------------*
*       text
*---------------------------------------------------------------------*
form make_node.
  it_nodes-name = wa_work-kunnr.
  it_nodes-color = 1.
  it_nodes-intensiv = 1.
  it_nodes-text = wa_work-kunnr.
  it_nodes-tlength = 16.
  it_nodes-tlevel = wa_work-level.
  it_nodes-tcolor = 1.
  it_nodes-tintensiv = 1.
  append it_nodes.
endform.                    "MAKE_NODE&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 May 2007 04:57:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/graphical-tree/m-p/2299298#M502374</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-28T04:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: Graphical Tree</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/graphical-tree/m-p/2299299#M502375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;From SE37 enter these tree related fun modules&lt;/P&gt;&lt;P&gt;and use the where used list&lt;/P&gt;&lt;P&gt;you will find lot of programs where these fun modules are used&lt;/P&gt;&lt;P&gt;see them and develop accordingly.&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;Go to tcode DWDM&lt;DEL&gt;&amp;gt;Controls&lt;/DEL&gt;-&amp;gt;Tree Controls.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you will find examples of program....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(OR)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tcode SE83 --&amp;gt;Tree control....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 May 2007 05:00:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/graphical-tree/m-p/2299299#M502375</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-28T05:00:18Z</dc:date>
    </item>
  </channel>
</rss>

