cancel
Showing results for 
Search instead for 
Did you mean: 

Close windows in Webdynpro ABAP

Former Member
0 Kudos

Dear Expert.

I have a aplication created in WDA. For the button "Rechazar" i have created an acction with  the following code.

method ONACTIONRECHAZAR .

    DATA: ls_contenedor TYPE swr_cont.

   CALL FUNCTION 'SAP_WAPI_DECISION_COMPLETE' "'SAP_WAPI_WORKITEM_COMPLETE'

     EXPORTING

       workitem_id      = wd_comp_controller->vg_wi_id

       decision_key     = '0002'   "Rechazar

       do_commit        = 'X'.

* Cerrar la ventana

   wd_this->cerrar_ventana( ).

  endmethod.

method CERRAR_VENTANA.

   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_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 ).

  endmethod.

However the system show the following message , and we want the the window is closed.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Juan,

Refer following threads,It might useful to you.

http://scn.sap.com/thread/910776

http://scn.sap.com/thread/3319401

Thanks

KH