cancel
Showing results for 
Search instead for 
Did you mean: 

get_Static_Attributes returns nothing for a few lead selections

Former Member
0 Kudos

Hi,

I am getting a strange behavior.

I am having a table in my screen. For some rows, everything works fine, but for few of them, I get run time errors. On debugging, I found that, for a those rows, (when I select them), the method get_static_attributes returns nothing.

This is my code :

Node_Mesg_Hdr = wd_Context->get_Child_Node( Name = wd_This->wdctx_Mesg_Hdr ).

Elem_Mesg_Hdr = Node_Mesg_Hdr->get_Element( ).

Elem_Mesg_Hdr->get_Static_Attributes(

importing

Static_Attributes = Stru_Mesg_Hdr ).

For a few certain rows as lead selection, the static attributes is empty, but for others it returns the attributes. Can somebody please explain the behavior ??

Thanks

Gagan

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Changing get_element to get_lead_selection didnt help. It still not returning static attributes for certain rows.

Any other suggestions ?

Thanks

Gagan

Former Member
0 Kudos

gagan , can u descibe me what runtime error r u getting ,

thn I wud be better able to tell u anything in this regard

Former Member
0 Kudos

To get the selected rows value you could also use get_selelcted_elements method of if_wd_context_node_info.

This would work with multiple rows selected from table.

Former Member
0 Kudos

hi Gagan,

I am using the following code :


->DATA : lo_nd_cn_table TYPE REF TO if_wd_context_node ,
  ->       lo_el_cn_table TYPE REF TO if_wd_context_element ,
 ->        ls_cn_table    TYPE wd_this->element_cn_table.

->*   navigate from <CONTEXT> to <CN_TABLE> via lead selection
 -> lo_nd_cn_table = wd_context->get_child_node(
->                   name = wd_this->wdctx_cn_table ).
->**    get element via lead selection
->  lo_el_cn_table = lo_nd_cn_table->get_lead_selection(  ).
->  lo_el_cn_table->get_static_attributes( IMPORTING
 ->            static_attributes = wa_table ).

where wa_table is of type strucure , the structure actually contains the same variables wid same type as there are attributes in my contxt node cn_table

I am successfully able to get the values from different rows of my table

pls see to it where r u missing