cancel
Showing results for 
Search instead for 
Did you mean: 

How to refer dynamic node?

Former Member
0 Kudos

Hi All

I create dynamic table with dynamic node. Table has one row, and one of the column is Button, if i click on this button i want to add on more empty row of same structure as above row with some changes. If we declare node in context for adding row we follow this code...

data: lr_node type ref to if_wd_context_node,

ls_struc type if_main_view=>element_nomenclature.

lr_node = wd_context->get_child_node( if_main_view=>wdctx_nomenclature ).

lr_node->bind_element( new_item = ls_struc set_initial_elements = abap_false ).

But here i create node dynamycally. how to refer dynamic node, and how to create row??

Thanks,

Madhan.

Accepted Solutions (0)

Answers (2)

Answers (2)

vineetrrakesh
Explorer
0 Kudos

HI Madhan,

You can store the dynamically created node in your Model, e.g. your assistance class or WD compcontroller and on every click on the button use the reference node to attach new rows.

Regards

Vineet

gill367
Active Contributor
0 Kudos

Use


data lr_element type ref to if_wd_context_element.
lr_element = lr_node->create_element(  ).
lr_node->bind_element( new_item = lr_element set_initial_elements = abap_false ).

thanks

sarbjeet singh