cancel
Showing results for 
Search instead for 
Did you mean: 

Create a link in a Button WD

Former Member
0 Kudos

hello all,

i want create a Link in a button, not Link to action, but a button generating a Link,

can you please tell me how can I do this?

thank you all

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

You will have to code the link to url in the onaction of the button.

see this post

[;

Edited by: edmorrissey on Jul 4, 2011 10:10 AM

Edited by: edmorrissey on Jul 4, 2011 10:10 AM

former_member199125
Active Contributor
0 Kudos

Hi,

I didn't get your question correctly. you want to generate a "link to url " element on click on button ? If yes

Create link to url element and make it invisible initially....... once you click on button, in that button action make it visible.

create one attribute of type wdui_visibility and bind it to visible property of link to URL element. and

wd_context->SET_ATTRIBUTE(

EXPORTING

NAME = `AMVISIBLE`

VALUE = '01' ).

note : 01 for invisible and 02 for visible.

Or

you can do this by dynamic programming.

Regards

Srinivas

Former Member
0 Kudos

hello,

yes i want generate a Link, but in a button not a link to URL,

but i didnt understand waht you mean? to create a link to URL element and make it in a button????

Former Member
0 Kudos

Hi,

Not clear.

You want link to url functionality on button click or you wnat to open one url on button click.

by crating external window you can open url on click on button. write this code on button action.

data lo_window_manager type ref to if_wd_window_manager.
data lo_api_component type ref to if_wd_component.
data lo_window type ref to if_wd_window.lo_api_component = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).

CALL METHOD lo_window_manager->CREATE_EXTERNAL_WINDOW
EXPORTING
URL = 'http://www.google.com/'
MODAL = ABAP_FALSE
HAS_MENUBAR = ABAP_TRUE
IS_RESIZABLE = ABAP_TRUE
HAS_SCROLLBARS = ABAP_TRUE
HAS_STATUSBAR = ABAP_TRUE
HAS_TOOLBAR = ABAP_TRUE
HAS_LOCATION = ABAP_TRUE
RECEIVING
WINDOW = lo_window.

lo_window->open( ).

Cheers,

Kris.