cancel
Showing results for 
Search instead for 
Did you mean: 

LinkToAction

Former Member
0 Kudos

Hi all,

I want to know about LinkToUrl. When i click the

LinkToUrl some actions should be happened.

Kindly send the full codings.

Thanks,

Ranjith.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

U can refer this coding

DATA: lr_column TYPE REF TO cl_salv_wd_column.
DATA: lr_link TYPE REF TO cl_salv_wd_uie_link_to_action.
DATA : lr_linky TYPE REF TO CL_SALV_WD_UIE_LINK_TO_URL.

lr_column = l_value->if_salv_wd_column_settings~get_column( 'PARTNER' ).

CREATE OBJECT lr_link.
lr_link->set_text_fieldname( 'PARTNER' ).
lr_column->set_cell_editor( lr_link ).
CREATE OBJECT lr_linky.
lr_linky->set_text_fieldname( 'PARTNER' ).
CALL METHOD lr_linky->SET_REFERENCE
  EXPORTING
   VALUE  = 'http://www.google.com'
   .
lr_column->set_cell_editor( lr_linky ).

Hope this helps U

Regards

Tamil

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>

> Hi

>

> U can refer this coding

>

>

DATA: lr_column TYPE REF TO cl_salv_wd_column.
> DATA: lr_link TYPE REF TO cl_salv_wd_uie_link_to_action.
> DATA : lr_linky TYPE REF TO CL_SALV_WD_UIE_LINK_TO_URL.
> 
> lr_column = l_value->if_salv_wd_column_settings~get_column( 'PARTNER' ).
> 
> CREATE OBJECT lr_link.
> lr_link->set_text_fieldname( 'PARTNER' ).
> lr_column->set_cell_editor( lr_link ).
> CREATE OBJECT lr_linky.
> lr_linky->set_text_fieldname( 'PARTNER' ).
> CALL METHOD lr_linky->SET_REFERENCE
>   EXPORTING
>    VALUE  = 'http://www.google.com'
>    .
> lr_column->set_cell_editor( lr_linky ).

>

>

> Hope this helps U

>

> Regards

> Tamil

Did this answer actually solve your problem? You never mentioned anything in your question about needing to create your link UI elements as part of an ALV. This code sample works for ALV. Were you actual looking for an ALV releated answer?

Answers (1)

Answers (1)

abhimanyu_lagishetti7
Active Contributor
0 Kudos

You have to use LinkToAction UI element, if you want an action to be assosiated with it.

LinkToUrl is to call other application

Abhi

Former Member
0 Kudos

Hi abi,

Can u plz tell me the sample codings for action event.

abhimanyu_lagishetti7
Active Contributor
0 Kudos

using LinkToAction

1. place the UI element in the View

2. create an Action and set the property onAction withe the created action

3. go to methods and choose the event handler and code

Using LinkToUrl

1. place the UI element in the View

2. set the reference property with the URL (ex: http://www.google.com )

when you click the LinkToUrl google page will be opened

Abhi