Skip to Content
avatar image
Former Member

'Expand All' icon in a tree structure?

Hi experts,

If we create a tree UI element in ABAP WD, we automatically get a 'Collapse All' icon.Is it possible to have a 'Expand All' icon as well?

thanks in advance,

Pras

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jan 14, 2008 at 07:42 AM

    Hello Pras,

    You will not get any Collapse All icon when you create a tree UI Element .

    You can expand or collapse the tree by clicking on the Parent Elements in the tree.

    If you want to explicitly handle the Expand All and Collapse All functionality you need to put a button in the toolbar with name Expand ALL and handle it explicitly by setting attribute EXPANDED to abap_true for each and every element in the tree for Expand All action and vice versa for Collapse All.

    Hope this is of some help.

    Regards,

    Ismail.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Toni,

      you have to put a button for Expand all. Then on the action of that button read the whole node to an itab, then loop the itab.. then fro each record,

      attach to a new element

      make the property expanded for the element

      add the element to the node..

      After looping bing the itab back to node,

      Regards

      Sarath

  • avatar image
    Former Member
    Nov 30, 2010 at 11:34 AM

    On the tree root (TREE UiElement), there's a property for "onExpandAll" Event.

    Just put the name of an action, and then implement your "expand all" method; yes you do have to code yourself, like others said. The only difference between a custom button is that the newly coded functionality is shown beside the default collapse button.

    Add comment
    10|10000 characters needed characters exceeded