cancel
Showing results for 
Search instead for 
Did you mean: 

How to exit from a WebDynpro ABAP application and open another url

Former Member
0 Kudos

Hi Friends,

How to exit from a WebDynpro ABAP application and open another url like (www.yahoo.com) in the same window of the WD4 application on click of a Button?

Regards,

Xavier

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi,

First of all you should create outbound plug in the window you are trying to exit with plufg type "Exit"

Then create method handler in the view with this code

data lo_view_cntr type ref to if_wd_view_controller.

data lo_win_cntr type ref to if_wd_window_controller.

data: l_parameter_list type wdr_event_parameter_list,

l_parameter type wdr_event_parameter,

l_val type ref to data,

l_val_url type REF TO data.

field-symbols: <fs> type any,

<fs_url> type any.

lo_view_cntr = wd_this->wd_get_api( ).

lo_win_cntr = lo_view_cntr->get_embedding_window_ctlr( ).

CREATE DATA l_val type c.

CREATE DATA l_val_url type string.

ASSIGN l_val->* to <fs>.

ASSIGN l_val_url->* to <fs_url>.

<fs> = 'X'.

<fs_url> = 'http://your-link.com'.

l_parameter-name = 'URL'.

l_parameter-value = l_val_url.

INSERT l_parameter INTO TABLE l_parameter_list.

lo_win_cntr->if_wd_view_controller~fire_plug( EXPORTING plug_name = 'EXIT_PLUG'

parameters = l_parameter_list ).

You can easily change this logic to exit application instead of redirecting to the site

just changing to

l_parameter-name = 'CLOSE_WINDOW'.

Former Member
0 Kudos

Hello, i tried you solution and it works for me.

The Problem is:

We have different components in our WD application, and if the user uses another application => then go back to WD menue and want to exit via your solution it doens´t work.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Xavier,

Follow this link

[]

In this link some links are given related to your problem.

I hope it hepls.

regards,

Rohit