cancel
Showing results for 
Search instead for 
Did you mean: 

Capturing Static Attributes from the Reference WDEVENT?

Former Member
0 Kudos

Hi Experts,

I have a Tree in a Table( With roselectable property initial) and on clicking its child(link to action), I need to capture the child calue clicked.

In the debugger, I found value in the WDEVENT local attribute's Parameters which conatins Name 'CONNTEXT_ELEMENT' and value as 'Refernce to class' and this refernce contains static attributes of my context node.

Can you tell me how to code for reading this static attributes using WDEVENT in my method.

Thanks

Depesh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,



  DATA:
    lt_events type WDR_EVENT_PARAMETER_LIST,
    ls_events type WDR_EVENT_PARAMETER.

***Field symbols
  field-symbols: <fs_value> type any.   "Attribute value in events table

***Move the event table to lt_events
  lt_events = wdevent->parameters.

read table  lt_events into ls_events with key name = 'TAB' . "'Name of event -Check this value in debugging and give it here.
   if sy-subrc eq 0.
    assign ls_events-value->* to <fs_value>.
    if sy-subrc eq 0.
      lv_select_tab = <fs_value>.           "selected tab name
    endif.                 "IF sy-subrc eq 0.
  endif.                 "IF sy-subrc eq 0.

Regards,

Lekha.

Former Member
0 Kudos

Hi Lekha,

Above code gives the object reference value such as ''.

How I can use this reference to get the static attribute of a node bind to it.

And what is type for lv_select_tab as assigning FS to Object reference variable is giving dump.

Thanks

Depesh

Former Member
0 Kudos

Hi,

Data context_element type ref to if_wd_context_element.

context_element = wdevent->get_context_element( 'CONTEXT_ELEMENT' ).
context_element->get_static_attributes( importing static_attributes = lv_stru ) .

Try this.

Radhika.

Former Member
0 Kudos

Hi Radhika,

Awesome..

Thanks for the information.

Answers (0)