on 04-08-2009 7:13 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.