cancel
Showing results for 
Search instead for 
Did you mean: 

how ? dynamically creating attrib in existing context node.

Former Member
0 Kudos

Hi all,

I have one context node, say it is 'FLIGHT'. It is mapped to a DDIC structure SFLIGHT (5 fields). Now I need to add one more attribute named 'DISP' with type String.

I am not able to add my own attribute to the context node that is created with structure. It allows only to add attributes from the stipulated DDIC structure that the context node is binded.

so it should be possible to add it dynamically through code. Please help me on how to add the attribute dynamically to the existing component controllers context node.

Thanks in advance.

Best Regards.

suresh.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

hi suresh,

code for adding context attribute dynamic to the node

data:lo_node tyepe ref to if_wd_context_node,

ui_attributes_info type ref to if_wd_context_node_info,

ls_att type wdr_context_attribute_info.

  • get node info

lo_node = wd_context->get_child_node( name ).

ui_attributes = lo_node->get_node_info( ).

ls_att-name = 'name of attribute'.

ls_att-type_name = ' Specify Type'

ui_attributes_info->add_attribute( attribute_info = ls_info ).

Regards,

janakiram.