Skip to Content
0
Former Member
Aug 05, 2009 at 07:12 AM

How to exit from an abap Webdynpro application on click of a button?

499 Views

Hi,

I have a requirement in which I need to close the window on click of a button.

I tried by declaring a outbound plug in window and writing the following piece of code in the action method of the view.

*----


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.

field-symbols: <fs> type any.

lo_view_cntr = wd_this->wd_get_api( ).

lo_win_cntr = lo_view_cntr->get_embedding_window_ctlr( ).

l_parameter-name = 'CLOSE_WINDOW'.

CREATE DATA l_val type string.

ASSIGN l_val->* to <fs>.

<fs> = 'X'.

l_parameter-value = l_val.

INSERT l_parameter INTO TABLE l_parameter_list.

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

parameters = l_parameter_list ).

*----


On click of button, I am getting the following error: "URL parameters specified for an exit or suspend plug, but no URL specified "

Can anyone give some input on why this error is occuring?

Thanks,

Subathra