Skip to Content

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

webdynpro ABAP. read context TABLE


i am trying to read a context in an webdynpro for ABAP where the context is an table. if I try to read a single attribute there is no problem:

  • get single attribute



name = `MATNR`


value = item_matnr ).

Now I see my value in the variable item_matnr.

But how can I get the whole context table EX_MAT_DATA into a internal table. I tried the the wizard with reading the context of this table EX_MAT_DATA and I get the following coding:


node_changing TYPE REF TO if_wd_context_node,

node_ex_mat_data TYPE REF TO if_wd_context_node,

elem_ex_mat_data TYPE REF TO if_wd_context_element,

stru_ex_mat_data TYPE if_tree=>element_ex_mat_data .

  • navigate from <CONTEXT> to <CHANGING> via lead selection

node_changing = wd_context->get_child_node( name = if_tree=>wdctx_changing ).

  • navigate from <CHANGING> to <EX_MAT_DATA> via lead selection

node_ex_mat_data = node_changing->get_child_node( name = if_tree=>wdctx_ex_mat_data ).

  • @TODO handle not set lead selection

IF ( node_ex_mat_data IS INITIAL ).


  • get element via lead selection

elem_ex_mat_data = node_ex_mat_data->get_element( ).

  • @TODO handle not set lead selection

IF ( elem_ex_mat_data IS INITIAL ).


  • alternative access via index

  • Elem_Ex_Mat_Data = Node_Ex_Mat_Data->get_Element( Index = 1 ).

  • @TODO handle non existant child

  • if ( Elem_Ex_Mat_Data is initial ).

  • endif.

  • get all declared attributes



static_attributes = stru_ex_mat_data ).

While debugging I find in node_ex_mat_data (CLASS=CL_WDR_CONTEXT_NODE_VAL) a attribute collection with 55 values (thats the number of values the context table should have) but I have no idea how to get the values for my internal table.

Please help.



Former Member

Hi Stefan,

You could call method get_static_attributes_table(). It returns the content of a node as an internal table. Only static attributes are considered of course.

Best regards,


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