cancel
Showing results for 
Search instead for 
Did you mean: 

Closing a window in Portal UWL..!

Former Member
0 Kudos

Hi Guys,

              I am using WebDynpro application for a workflow task in Portal.

When I click on a decision step in UWL, the WebDynpro view will popup.

I try to close this window after a button is pressed. but its not happening.

I used the following set of codes..

*****************************************************************

DATA lv_wc TYPE REF TO IF_WD_WINDOW_CONTROLLER.

data lv_view TYPE REF TO IF_WD_VIEW_CONTROLLER.

data lo_window  type ref to if_wd_window.

lv_view = wd_this->wd_get_api( ).

  lv_wc = lv_view->GET_EMBEDDING_WINDOW_CTLR( ).

   lo_window = lv_wc->GET_WINDOW( ).

   lo_window->CLOSE( ).

Throws Object Null Exception

***************************************

  DATA : l_view_cntr TYPE REF TO if_wd_view_controller,

         l_win_cntr  TYPE REF TO if_wd_window_controller,

         l_window    TYPE REF TO if_wd_window,

         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.

  l_view_cntr = wd_this->wd_get_api( ).

  l_win_cntr  = l_view_cntr->get_embedding_window_ctlr( ).

**  l_win_cntr->close( ).

  l_parameter-name = 'CLOSE_WINDOW'.

  CREATE DATA l_val TYPE c.

  ASSIGN l_val->* TO <fs>.

  <fs> = 'X'.

  l_parameter-value = l_val.

  INSERT l_parameter INTO TABLE l_parameter_list.

  l_win_cntr->if_wd_view_controller~fire_plug(

  EXPORTING plug_name = 'EXIT_PLUG'

             parameters = l_parameter_list ).

This one not doing anything. My window is still open.

Thanks

Sam

Accepted Solutions (1)

Accepted Solutions (1)

former_member185241
Active Participant
0 Kudos

Hey Sam,

you have to create a exit plug in window and instead of EXIT_PLUG give window exit plug name.

Thanks

Abhishek

Former Member
0 Kudos

Thanks Abhishek. My my Exit plug name is EXIT_PLUG.

But even though I set it to Exit plug type some how it stay as Standard plug, thats why I couldn't close it.

Cheers

Sam

former_member185241
Active Participant
0 Kudos

Cheers !. 🙂

Answers (0)