cancel
Showing results for 
Search instead for 
Did you mean: 

getting child elements in view controller

Former Member
0 Kudos

Hi all,

I know this is not a difficult problem, but I'm having a mental block right now.  I have a transparent container nested inside a transparent container nested inside a transparent container.  inside WDMODIFYVIEW, I can get the first transparent container, but how to I get to the next one? and then to the next one?

This is what I have right now

DATA lv_table_planning TYPE REF TO cl_wd_uielement.

lv_table_planning = lv_root_element->get_child( id = 'TCO_TABLE_PLANNING' ).

Now, I know I'm referencing an element class, so that is probably the root of my problem.

What I am doing is enhancing something standard delivered, but trying to control the visibility of an element that is nested deep.

Anyone have any ideas?

Hope this makes sense,

Kevin

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello try this..

  DATA lr_container TYPE REF TO cl_wd_uielement_container.
lr_container ?= view->get_element( 'NEW_NESTED_TC' ).

Legends: "NEW_NESTED_TC" nested inside a transparent container name.

Former Member
0 Kudos

Hi Chandra,

Thanks for the info.  I was under the impression that you had to get the root container and traverse down the structure to get the element you want.

Thanks!

Kevin

Answers (0)