Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

get_attribute without get_element( )

Hi to all,

what is the difference between calling method get_attribute from the context node instance and the element instance?

Example.

the wizard write :

DATA lo_node TYPE REF TO if_wd_context_node.

DATA lo_el_node TYPE REF TO if_wd_context_element.

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

  • get element via lead selection

lo_el_node= lo_node->get_element( ).

  • get single attribute

lo_el_node->get_attribute(

EXPORTING

name = `ZINPUT_2`

IMPORTING

value = lv_zinput_2 ).

Instead , i write:

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

lo_node ->get_attribute(

EXPORTING

name = `ZINPUT_2`

IMPORTING

value = lv_zinput_2 ).

it works ,

but what element is gotten (lead selection default)?

thanks to all

Alessandro

Not what you were looking for? View more on this topic or Ask a question