cancel
Showing results for 
Search instead for 
Did you mean: 

Link to URL in ALV webdynpro

Former Member
0 Kudos

Hello all,

I would like to use a link to URL in a cell of a ALV webdynpro but i want that the URL is open in the current window.

I try force target with '_self' as show below but the url is open in a new window.

LOOP AT lt_details ASSIGNING <ls_details>.

     lv_tabix = sy-tabix.

     CREATE OBJECT lo_link_to_url.

     CONCATENATE lv_url '&werks=' <ls_details>-invnu INTO lv_url_with_par.

     CALL METHOD lo_link_to_url->set_reference

       EXPORTING

         value = lv_url_with_par.

     lo_link_to_url->set_target( '_self' ).

     lv_text  <ls_details>-invnu.

     CALL METHOD lo_link_to_url->set_text

       EXPORTING

         value = lv_text.

     CREATE OBJECT l_cv .

     l_cv->set_key( value = lv_url_with_par ).

     l_cv->set_editor( value = lo_link_to_url ).

     lo_column->add_cell_variant( r_cell_variant = l_cv ).

     lo_column->set_sel_cell_variant_fieldname( 'ZVARIANT' ).

     <ls_details>-zvariant = lv_url_with_par.

   ENDLOOP.

Can you say me if it is possible  and how to do that?

Thanks

David

Accepted Solutions (1)

Accepted Solutions (1)

former_member184578
Active Contributor
0 Kudos

Hi,

The link to url will open as external window. If you want to open the link in the same window. Create a LinktoAction cell editor and on action of that open the Link in the same window by using EXIT plug.

check this doc for reference: http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0018077-f0c9-2b10-87af-eb9bb4077...

hope this helps,

Regards,

Kiran

Answers (0)