<?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 CL_GUI_SIMPLE_TREE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-simple-tree/m-p/1698935#M306489</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 using this class to build a tree, Now i want to refresh the tree is there any method to do that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Kalpanashri Rajendran.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Nov 2006 10:42:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-17T10:42:27Z</dc:date>
    <item>
      <title>CL_GUI_SIMPLE_TREE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-simple-tree/m-p/1698935#M306489</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 using this class to build a tree, Now i want to refresh the tree is there any method to do that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Kalpanashri Rajendran.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Nov 2006 10:42:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-simple-tree/m-p/1698935#M306489</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-17T10:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: CL_GUI_SIMPLE_TREE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-simple-tree/m-p/1698936#M306490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rajendran&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly let us know the problem you are facing????&lt;/P&gt;&lt;P&gt;Please avoid opening duplicate threads on the same topic. Help to close the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Nov 2006 10:44:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-simple-tree/m-p/1698936#M306490</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-17T10:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: CL_GUI_SIMPLE_TREE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-simple-tree/m-p/1698937#M306491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;as far as i know, we do not have a concpet of refresh in this class, when you click on a perticular node, the nove method is called and the cells will be filled according to your program.if you want to refresh, then change your internal table in your code, then if the user press expand or collapse then the table data will be come in the output&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Nov 2006 10:53:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-simple-tree/m-p/1698937#M306491</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-17T10:53:39Z</dc:date>
    </item>
    <item>
      <title>Re: CL_GUI_SIMPLE_TREE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-simple-tree/m-p/1698938#M306492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try  method,   DELETE_ALL_NODES.&lt;/P&gt;&lt;P&gt;This will work same as refresh...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Nov 2006 13:35:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-simple-tree/m-p/1698938#M306492</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-17T13:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: CL_GUI_SIMPLE_TREE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-simple-tree/m-p/1698939#M306493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Kalpanashri&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I copied sample report SAPSIMPLE_TREE_CONTROL_DEMO and added button "REFRESH" to the gui status. When the button is pushed routine REFRESH_TREE is called in PAI. This routine has the following coding:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;MODULE PAI_100 INPUT.

  CASE G_OK_CODE.
    when 'REFRESH'.
      perform REFRESH_TREE.

    WHEN ...
  ENDCASE.

* CAUTION: clear ok code!
  CLEAR G_OK_CODE.
ENDMODULE.                 " PAI_0100  INPUT&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  REFRESH_TREE
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM refresh_tree .
* define local data
  DATA:
    ls_node       TYPE mtreesnode,
    node_table    TYPE node_table_type.


* Delete entire tree
  CALL METHOD g_tree-&amp;gt;delete_all_nodes
    EXCEPTIONS
      failed            = 1
      cntl_system_error = 2
      OTHERS            = 3.
  IF sy-subrc &amp;lt;&amp;gt; 0.
*   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

* Same BUILD routine as for the first run
  PERFORM build_node_table
              USING
                 node_table.

* Modify node table to see the effect of "refreshing"
  READ TABLE node_table INTO ls_node
       WITH KEY text = 'Root'.
  ls_node-text = '2nd Root'.
  modify node_table from ls_node index syst-tabix.
*
  READ TABLE node_table INTO ls_node
       WITH KEY text = 'Child1'.
  ls_node-text = '2nd Child1'.
  modify node_table from ls_node index syst-tabix.


* Add "refreshed" nodes to tree
  CALL METHOD g_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.
  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE a000.
  ENDIF.

ENDFORM.                    " REFRESH_TREE&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Nov 2006 21:08:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-simple-tree/m-p/1698939#M306493</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2006-11-19T21:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: CL_GUI_SIMPLE_TREE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-simple-tree/m-p/1698940#M306494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;   The one way is how Uwe described to add new nodes to the tree or delete nodes.&lt;/P&gt;&lt;P&gt;but if you want to do a refresh of the entire tree i would suggest that you free the container and the tree instance and rebuild that would act as a refresh too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for eg:&lt;/P&gt;&lt;P&gt;lets assume the tree is already created and now a refresh is being triggered&lt;/P&gt;&lt;P&gt;  refresh block &lt;/P&gt;&lt;P&gt;  free container.&lt;/P&gt;&lt;P&gt;  free tree_instance.&lt;/P&gt;&lt;P&gt;clear all internal tables&lt;/P&gt;&lt;P&gt;  call tree creation subroutine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope you find this helpful&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kinshuk&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Nov 2006 05:05:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cl-gui-simple-tree/m-p/1698940#M306494</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-20T05:05:38Z</dc:date>
    </item>
  </channel>
</rss>

