Skip to Content
author's profile photo Former Member
Former Member

Delete or remove dynamic Attributes.

Hi experts.

In my WD I have created dynamic attributes with this code:

CALL METHOD context_info->add_attribute
attribute_info = attr_info

Now I need delete the attributes and i'm trying with this method:

CALL METHOD me->remove_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?




Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jan 02, 2014 at 04:36 PM

    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( ).




    you can also try the method REMOVE_DYNAMIC_ATTRIBUTES( )

    Hope this resolves your issue.



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.