cancel
Showing results for 
Search instead for 
Did you mean: 

Clear context attributes

Former Member
0 Kudos

Hi all,

is there a better way to clear a context attribute value than

lo_xxx->set_attribute(

EXPORTING

Name = `NAME`

value = '' ).

Thanks !

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Try this...

DATA lo_el_context TYPE REF TO if_wd_context_element.

DATA ls_context TYPE wd_this->element_context.

  • get element via lead selection

lo_el_context = wd_context->get_element( ).

    • get single attribute

lo_el_context->set_attribute_null(

EXPORTING

name = `ATTRIBUTE NAME`

).

Cheers,

Kris.

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks!

former_member184578
Active Contributor
0 Kudos

Hi Benjamin.,

If ur attribute is in a node., use invalidate() method.. this method will clear all the attributes in the node.,

lo_nd_test->invalidate( ).

Thanks & Regards

Kiran

former_member389677
Active Participant
0 Kudos

Hi,

U can use xxx->SET_ATTRIBUTE_NULL mathod.

Thanks,

Shaira.