cancel
Showing results for 
Search instead for 
Did you mean: 

Link in Table

Former Member
0 Kudos

Hi,

I have a table with data in 1 column as links. When i click on the link i need to open another view based on the data in the column i have clicked.

How can I access the data in the cell which I have clicked????

Can anybody help me out with this??????

Regards,

Kanakaraj V A

Accepted Solutions (1)

Accepted Solutions (1)

arjun_thakur
Active Contributor
0 Kudos

Hi Kanakaraj,

Refer this code to get the index of the row which has been clicked:


lr_element type ref to if_wd_context_element,
          lv_index type i.
 
  lr_element = wdevent->get_context_element( name = 'CONTEXT_ELEMENT'  ).
  lv_index = lr_element->get_index( ).

You can refer this [thread|; which explains how to do it.

I hope it helps.

Regards

Arjun

Edited by: Arjun Thakur on Apr 8, 2009 11:47 AM

Former Member
0 Kudos

Thanks guys.. I got the Solution..

Answers (2)

Answers (2)

abhimanyu_lagishetti7
Active Contributor
0 Kudos

Add a new parameter in the event handler of the link

CONTEXT_ELEMENT TYPE REF TO IF_WD_CONTEXT_ELEMENT

and inside the method code to read the attribute of the context element to get the value.

CONTEXT_ELEMENT->GET_ATTRIBUTE( EXPORTING NAME = '<attribute name>' IMPORTING

VALUE = <variable of type that of your context attribute> ).

Framework automatically passed the clicked context element to the event handler method with the name CONTEXT_ELEMENT

Abhi

former_member40425
Contributor
0 Kudos

hi

Follow this thread.

I hope it helps.

Regards,

Rohit