on 01-02-2014 3:52 PM
Hi experts.
In my WD I have created dynamic attributes with this code:
CALL METHOD context_info->add_attribute
EXPORTING
attribute_info = attr_info
Now I need delete the attributes and i'm trying with this method:
CALL METHOD me->remove_attribute
EXPORTING
name = 'NAME_OF_ATTRIBUTE'
It works fine because delete the attributes but it is removing the info of the other nodes. And I don't need this.
How I can delete this attributes without losing the other node data?
Thanks!
.
.
Hi Alberto,
You need to get the reference of your node and then call the method remove_attribute( )
Let us say you want to remove the attribute my_attribute from node MY_NODE
Please follow the below code
data lo_node type ref to if_wd_context_node.
data lo_node_info type ref to if_wd_context_node_info.
" get node ref
lo_node = wd_context->get_child_node( name = 'MY_NODE' ).
" get node info object
lo_node_info = lo_node->get_node_info( ).
lo_node_info->remove_attribute(
exporting
NAME = 'MY_ATTRIBUTE' ).
you can also try the method REMOVE_DYNAMIC_ATTRIBUTES( )
Hope this resolves your issue.
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.