cancel
Showing results for 
Search instead for 
Did you mean: 

Expand and Collapse all Functionality

Former Member
0 Kudos

Hi All,

Can any help me in how to implement the expand all and collapse all functionality in Webdynpro for ABAP?

u2022 Expand all u2013 by clicking this button the drill-down functionality allows the user to display lower organizational levels,

u2022 Collapse all u2013 by clicking this button the drill-down functionality allows the user to close the displayed lower organizational levels,

Many Thanks in Advance,

Shilpa Dhawan

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

It's not clear as to with what component you are trying to achieve this. If it is a Table or a Tree go as suggested by Chris. If you have like a static content, then place the content inside the Tray component, which will automatically provide you with the Expand and Collapse option or if you have some other content, try playing with the visible property of the component.

Former Member
0 Kudos

Hello ,

I want to use table as the data is to be displayed in the tabular form.

structure is like this:

ORG UNIT

employee1

employee2

employee3

.....

sub-ORGUNIT

employee1

employee2

employee..n

sub_sub_ORGUNIT

employee1

employee2

employee..n

Here ORGUNIT ID and employees appear in different columns of table.

Thanks and Regards,

Shilpa Dhawan

ChrisPaine
Active Contributor
0 Kudos

Hi Shilpa,

which UI element are you using? Table, or Tree?

You will need to recursively loop through the context nodes, setting the "expanded" attribute to true for every node/element.

I think ALV does this for you when using a hierarchical table (but I might be wrong).

Note - that depending on the implementation of the tree - it might be that all elements are not loaded initially and that any "expand all "functionality might take a while to work (if each node has to be loaded).

Chris