Skip to Content
Former Member
Nov 30, 2006 at 11:17 AM

TABLE, MultiNoLead (0..n), TreeByKeyTableColumn, Collapse: Keep selections



Hi all,


I created a view with context cardinality 0..n, UI element TABLE, and selection as MultiNoLead. I addition, I established a tree via column type TreeByKeyTableColumn.

I do not use a SUPPLY method for my context node, but solely locate within WDDOMODIFYVIEW. Within this view, my application creates a simple tree that simply consists of two levels.

Let's assume, in a given example there exists one level 1 node with three subordinated level 2 nodes (IS_LEAF = X). Further, I yet expanded the level 1 node and in the resulting tree I selected two of its three subordinated level 2 nodes


I collapse the level 1 node.

What's going on:

The collapse action incorporates a round trip and the first thing I do in WDDOMODIFYVIEW (especially before a BIND_TABLE action) is to retrieve the context node and to get the selected elements:



lr_node type ref to if_wd_context_node,

lt_elem type wdr_context_element_set.

  • Get node

lr_node = wd_context->get_child_node( name = `INCLOG_TABLE` ).

  • Get current selections

lt_elem = lr_node->get_selected_elements( ).



The two selected (but about to be hidden) level 2 elements do not (better: no longer) show up in table LT_ELEM and I thus cannot re-select them after a BIND_TABLE via if_wd_context_element->set_selected( abap_true ). I want to do this to keep these level 2 selections if I re-expand the level 1 node.


How can collapsed sub-nodes keep their NoLead-selection?

Thanks in advance & best regards,