cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Alv and Hyperlink

Former Member
0 Kudos

I've created an ALV with only one column which cells are LinkstoAction, and then, hidden the rest of table, so, only the values of the

cells with hyperlinks are shown.

The problem is the following: when i click one hyperlink, the target window remains the same, and i have

no way to know which hyperlink was clicked, cause the selection column was hidden just before.

Is there any way to solve this?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I've created an ALV with only one column which cells are LinkstoAction, and then, 
hidden the rest of table, so, only the values of the cells with hyperlinks are shown.
Your query states that you have created an ALV therefore i had suggested the steps related to ALV. In case you have a Table Control uielement, you can use the following code in the onAction method.
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 = ls_stru ),
" ls_stru will have the contents of the entire row, ls_stru-fieldname will give you the value
Radhika.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

I can´t find the 'onClick' envent in my Table.

My table has the events:

- onFilter

- onLeadSelect

- onScroll

- onSelect

- onSort

And the column has the envent:

- OnAction

I have tried to implement the code in the OnAction event of the colum but i haven´t the R_PARAM.

Former Member
0 Kudos

HI,

The listed out events by oyu are for Normal TABLE UI element.

Are you using ALV or TABLE UI element.

For ALV, refer Radhika's post.

Former Member
0 Kudos

You must have implemented the onClick event. In this event r_param parameter is available which returns all the required details.

data: lr_node type ref to if_wd_context_node,
data: l_index type i.
data: l_value type string.
field-symbols: <l_value> type any.

l_index = r_param->index. " index of the row 

assign r_param->value->* to <l_value>. 
l_value = <value>. " value of the hyperlink that was clicked
Check this article, it will help you. [http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/bd28494a-0801-0010-45a3-fc359d82d3e8&overridelayout=true] Radhika.