on 11-30-2008 11:25 AM
Hi,
i have a table element with several lines. One column is a LinkToAction. If the user presses on it, the WDA needs to jump into a new view passing a parameter to the outbound plug.
The parameter is in another column in the table (this column is hidden).
how can i identify in which row the user pressed on the LinkToAction? the only thing I need would be the index of the row. I could then read the context, determine the exporting parameter for the outbound plug and fire to it.
Thanks for your help!
Hendrik
Hello Hendrick ,
You can use the WDEVENT ( Importing parameter of Action Handler mehtod) .
You can get the context element by calling the method as follows :
wdevent->get_context_element( 'CONTEXT_ELEMENT').
this will retrun you the row in which user has pressed link to action .
Hope this will help you .
Regards
Vivek
PS: Please provide the points if answer is helpful .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Vivek,
thanks for you fast response!
I think I was a little bit confused. I need to apply your coding to the event of the LinkToAction?
I thought that this will only provide the name and value of the LinkToAction-Element and not the table row.
The thing is. I dont want to make any row "selectable" in the table due to the layout requirements. Furthermore I want to hide the table key because its only for internal purposes. I want to apply the LinkToAction on the description, because this is the only think the user can judge about. then I need to determine the hidden table key of the row on which the used executed the LinkToAction.
So is your coding really to be applied to the LinkToAction or on any table event?
Sorry for this additional answer. Normally I simply try out an answer like yours, but my view and logic is not complete yet.
Could you give me some additional help?
Thanks,
Hendrik
Hendrik,
As Vivek said you need to write this code on the ActionHandler of LinkToAction
data: lr_element type ref to if_wd_context_element,
lv_index type i.
lr_element = wdevent->get_context_element( name = 'CONTEXT_ELEMENT' ).
CALL METHOD lr_element->get_attribute
EXPORTING
name = 'MATNR' " Give the name of your hidden column in here
IMPORTING
value = lv_matnr. " Your column value would get saved into this variable
add this lv_mantr to your url and invoke that on the click of LinkToAction
for reference check this thread
https://forums.sdn.sap.com/click.jspa?searchID=19318964&messageID=6336039
Thanks
Bala Duvvuri
hi,
pls refer to this thread:
https://forums.sdn.sap.com/click.jspa?searchID=19324709&messageID=6334339
i hope it helps.
regards
arjun
Edited by: arjun on Dec 1, 2008 10:26 AM
User | Count |
---|---|
84 | |
24 | |
11 | |
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.