cancel
Showing results for 
Search instead for 
Did you mean: 

context node + add attributes

Former Member
0 Kudos

Hello Friends,

I have a context node ( which should contains 0:n values ).... the attributes of the context node filled one by one ( its file upload attributes ) e.g user upload fileA i add the attribute ( for first one its okay ) then later user upload the fileB again attributes are added, but the size of the node remains 1 ?

I have a feelings its always overwrite the previous values.....

Please help me how to fix this issue ? do I neeed to modify the index ? or am I providing properties of context node wrong ?

Thanks and kind regards,

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi Suman,

Exactly the same way I tried and checked ur post and you have confirmed me with the way I have already solved the problem,

Thanks anyway....

Regards

Former Member
0 Kudos

Hi Shah,

exactly it is overwriting the previous entry.Because mistake in your logic.First get the values from the node then assign the new value to node.

Write the below logic in onaction of add data method.

data: lo_nd_node type ref to if_wd_context_node,

ls_data type wd_this->element_node,

lt_data type wd_this->elements_node.

  • navigate from <CONTEXT> to <NODE> via lead selection

lo_nd_node = wd_context->get_child_node( name = wd_this->wdctx_node ).

call method lo_nd_node->get_static_attributes_table

importing

table = lt_data .

  • Add empty row to the table

append ls_data to lt_data.

lo_nd_node->bind_table( lt_data ).