<?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: Tree Display in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/tree-display/m-p/2391516#M531878</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dinesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BWKEY is the costing area. You said it's about company code and plant. That should be WERKS and BUKRS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the structure of ITAB1, use select into corresponding fields of table, check the results in your table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Jun 2007 10:21:21 GMT</pubDate>
    <dc:creator>Clemenss</dc:creator>
    <dc:date>2007-06-18T10:21:21Z</dc:date>
    <item>
      <title>Tree Display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tree-display/m-p/2391511#M531873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to create a tree display based on the following SAP standard program&lt;/P&gt;&lt;P&gt;SAPSIMPLE_TREE_CONTROL_DEMO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of "ROOT" i would like to display all company codes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While clicking the Company Code it should display all the plants under that specific company code. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can anyone help me out?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 07:23:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tree-display/m-p/2391511#M531873</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T07:23:38Z</dc:date>
    </item>
    <item>
      <title>Re: Tree Display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tree-display/m-p/2391512#M531874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in the standard porgram SAPSIMPLE_TREE_CONTROL_DEMO ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The  Root was  defualt  passed  ....  if you want to  pass  the company  code  then ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write  a  select  query for Company code and  pass  it ...... in  the below example  i am passing the &amp;lt;b&amp;gt;Purchase  order  list  to the RooT&amp;lt;/b&amp;gt;. ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM create_alvtree_hierarchy .
  DATA: NODE LIKE MTREESNODE,
        ld_node type string.

  LOOP AT it_ekko INTO wa_ekko.
* Build the node table.

* Caution: The nodes are inserted into the tree according to the order
* in which they occur in the table. In consequence, a node must not
* occur in the node table before its parent node.

*   Node with key 'Root'
    &amp;lt;b&amp;gt;node-node_key = wa_ekko-ebeln.&amp;lt;/b&amp;gt; " 'Root'.   "#EC NOTEXT
    " Key of the node
    CLEAR node-relatkey.      " Special case: A root node has no parent
    CLEAR node-relatship.     " node.

    node-hidden = ' '.        " The node is visible,
    node-disabled = ' '.      " selectable,
    node-isfolder = 'X'.      " a folder.
    CLEAR node-n_image.       " Folder-/ Leaf-Symbol in state "closed":
    " use default.
    CLEAR node-exp_image.     " Folder-/ Leaf-Symbol in state "open":
    " use default
    CLEAR node-expander.      " see below.
    node-text = wa_ekko-ebeln.      "'Root'.
    APPEND node TO node_table.

    LOOP AT it_ekpo INTO wa_ekpo WHERE ebeln EQ wa_ekko-ebeln.
*     Node with key wa_ekpo-ebelp    "'Child1'
      ld_node = sy-tabix.
      concatenate wa_ekpo-ebelp ld_node into ld_node.
      node-node_key = ld_node.  "'Child1'. #EC NOTEXT

*     Node is inserted as child of the node with key wa_ekpo-ebeln  "'Root'.
      node-relatkey = wa_ekpo-ebeln.  " 'Root'.
      node-relatship = cl_gui_simple_tree=&amp;gt;relat_last_child.

      node-hidden = ' '.
      node-disabled = ' '.
      node-isfolder = ' '.
      CLEAR node-n_image.
      CLEAR node-exp_image.
      node-expander = ' '.  " The node is marked with a '+', although
*                        it has no children. When the user clicks on the
*                        + to open the node, the event
*                        expand_no_children is fired. The programmer can
*                        add the children of the
*                        node within the event handler of the
*                        expand_no_children event
*                        (see method handle_expand_no_children
*                        of class lcl_application)

      node-text = wa_ekpo-ebelp.
      APPEND node TO node_table.

    ENDLOOP.
  ENDLOOP.

* Add nodes to alv tree
  CALL METHOD GD_TREE-&amp;gt;ADD_NODES
    EXPORTING
      TABLE_STRUCTURE_NAME = 'MTREESNODE'
      NODE_TABLE           = NODE_TABLE
    EXCEPTIONS
      FAILED                         = 1
      ERROR_IN_NODE_TABLE            = 2
      DP_ERROR                       = 3
      TABLE_STRUCTURE_NAME_NOT_FOUND = 4
      OTHERS                         = 5.
ENDFORM.                    " create_alvtree_hierarchy
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if it is usefull ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Girish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 07:36:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tree-display/m-p/2391512#M531874</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T07:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: Tree Display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tree-display/m-p/2391513#M531875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi dinesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this should be an interactive one. you design all the plant nodes.&lt;/P&gt;&lt;P&gt;when ever you click on company code write all the plants node.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;method 1:&lt;/P&gt;&lt;P&gt;Case sy-ucomm.&lt;/P&gt;&lt;P&gt;when '&amp;amp;IC1'.&lt;/P&gt;&lt;P&gt; write all the plant nodes.&lt;/P&gt;&lt;P&gt;make sy-page value equals to current page&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Method 2:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write the code in the event AT LINE-SELECTION. &lt;/P&gt;&lt;P&gt;Get the cursor value of company code and print the plants.&lt;/P&gt;&lt;P&gt;make sy-page value equals to current page.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 07:51:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tree-display/m-p/2391513#M531875</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T07:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: Tree Display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tree-display/m-p/2391514#M531876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Girish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I passed the values for company code and plant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i also wrote a select statement,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT BWKEY
       BUKRS

       FROM T001K

       INTO TABLE ITAB1.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But it is showing an error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;KEY ALREADY USED&lt;/P&gt;&lt;P&gt;LAST ERROR NODE KEY :1000&amp;lt;/b&amp;gt;&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>Mon, 18 Jun 2007 09:31:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tree-display/m-p/2391514#M531876</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T09:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: Tree Display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tree-display/m-p/2391515#M531877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is showing that error and going to dump &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 09:33:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tree-display/m-p/2391515#M531877</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T09:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: Tree Display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tree-display/m-p/2391516#M531878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dinesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BWKEY is the costing area. You said it's about company code and plant. That should be WERKS and BUKRS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the structure of ITAB1, use select into corresponding fields of table, check the results in your table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 10:21:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tree-display/m-p/2391516#M531878</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2007-06-18T10:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: Tree Display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tree-display/m-p/2391517#M531879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Clemens Li,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both BWKEY and WERKS have the same values in T001W and T001K.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i used the select like this,&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT T001W~WERKS
       T001K~BUKRS

       INTO TABLE ITAB1

       FROM T001W INNER JOIN T001K ON T001W~BWKEY = T001K~BWKEY
                                  AND T001W~WERKS = T001K~BWKEY.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;no it is showing the Error as &amp;lt;b&amp;gt;"NO EMPTY KEYS ALLOWED IN GUI MODE"&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;and going to dump. It is showing the function module &lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'AC_FLUSH_CALL'&lt;/P&gt;&lt;P&gt;      MESSAGE ID 'CNDP' TYPE 'X' NUMBER 006 RAISING CNTL_ERROR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;Dinesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 11:05:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tree-display/m-p/2391517#M531879</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T11:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: Tree Display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tree-display/m-p/2391518#M531880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry... That error was coming because i called the same Method twice.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while debugging the values for Company Code and Plant are coming into the WA..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it is not gettin displayed on the Custom container... The Tree also is not generated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2007 11:49:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tree-display/m-p/2391518#M531880</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-18T11:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: Tree Display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tree-display/m-p/2391519#M531881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2007 08:53:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tree-display/m-p/2391519#M531881</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-19T08:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: Tree Display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tree-display/m-p/2391520#M531882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2007 08:54:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tree-display/m-p/2391520#M531882</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-19T08:54:27Z</dc:date>
    </item>
  </channel>
</rss>

