cancel
Showing results for 
Search instead for 
Did you mean: 

How to get selected value of LinkToAction from Table in Web dynpro ABAP ?

Former Member
0 Kudos

Hi,

Experts,

I have created a table under that table i have used LinkToAction UI Element and i have filled up to 10 rows under the table but when i was clicked 5 LinkToAction text then i am not able get that text instead of that i am getting first LinkToAction text in every select so how to solve it.

EX:

In Web Dynpro View :

Table :

select

[one]

[two]

[three]

when i select 2nd row of table in column 'Select' i have to get 'two' as value but i am getting the first row value of table for every select row.

how to acheive this plese give any solution for it.

thanks in advance,

Shabeer a

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi,

Refer this code to get index and value of LinkToAction Clicked in a Table :

DATA lr_element TYPE REF TO if_wd_context_element.

DATA lv_index TYPE i.

DATA lv_attr TYPE string.

lr_element = i_event->get_context_element('CONTEXT_ELEMENT').

"To Get Index of Row in which link to action is clicked.

lv_index = lr_element->get_index( ).

"To Get the Value of Link To Action Clicked.

lr_element ->get_attribute(

exporting

name = `STATUS`

importing

value = lv_attr ).

Former Member
0 Kudos

Hi,

You need to select the check box "Transfer UI event parameters" while creating the Action.

You will get the current context element as a parameter of action handler from which you can retrieve the text.

Please let me know if you need further explanation.

Thanks,

Feroz

Edited by: Feroz Khan Pathan on Nov 6, 2009 12:30 PM