on 12-23-2008 10:15 AM
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
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'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.