Skip to Content
0
Former Member
Nov 24, 2011 at 11:07 AM

Closing a Window in portal

228 Views

Hello experts

I am trying to close a window in the portal.

I used the below code.

DATA: lr_view_cntr TYPE REF TO if_wd_view_controller,

lr_win_cntr TYPE REF TO if_wd_window_controller,

lt_parameter_list TYPE wdr_event_parameter_list,

ls_parameter TYPE wdr_event_parameter,

lr_val TYPE REF TO data.

FIELD-SYMBOLS <fs> TYPE any.

lr_view_cntr = wd_this->wd_get_api( ).

lr_win_cntr = lr_view_cntr->get_embedding_window_ctlr( ).

  • Set this value because we have to close the window

ls_parameter-name = 'CLOSE_WINDOW'.

  • Set parameter value to 'X' - true

CREATE DATA lr_val TYPE c.

ASSIGN lr_val->* TO <fs>.

<fs> = 'X'.

  • Add Parameter into parameter list

ls_parameter-value = lr_val.

INSERT ls_parameter INTO TABLE lt_parameter_list.

  • Call outbound exit plug of the window in which this view is embedded

lr_win_cntr->if_wd_view_controller~fire_plug(

EXPORTING plug_name = 'EXIT_PLUG'

parameters = lt_parameter_list ).

It is well being executed in web dynpro application but the same is not happening in the portal instead a message

"The application has closed and you can now close the window" is being displayed. but the window is not being closed.

Could anyone please help me achieving this in portal.

Thanks

Shravan