Skip to Content

How to close window tab using popup 'OK' button in ABAP Web DynPro?

Hi,

I have a requirement to display a popup when user click on a custom link given in ESS. Popup ALV displays some records and user selects any of the single row after that as soon as user clicks on 'OK' button of popup, it should be closed as well as the tab of 'Interner Explorer' should also be closed.

I am able to close popup however not able to close IE tab though I have used 'EXIT' outbound plug and fire-plug method on 'OK' button event of popup.

Below is the code for popup OK button to close popup as well as IE tab:

"To close PopUp window

wd_comp_controller->go_window->close( ).

* To Close Window

DATA LO_API_V_MAIN TYPE REF TO IF_WD_VIEW_CONTROLLER.

LO_API_V_MAIN = WD_THIS->WD_GET_API( ).

DATA : LO_WINDOW TYPE REF TO IF_WD_WINDOW_CONTROLLER.

CALL METHOD LO_API_V_MAIN->GET_EMBEDDING_WINDOW_CTLR

RECEIVING

RESULT = LO_WINDOW.

DATA : IT_PARAMETERS TYPE wdr_event_parameter_list,

WA_PARAMETERS TYPE wdr_event_parameter,

LV_DATA TYPE REF TO DATA.

FIELD-SYMBOLS : <FS_PARA> TYPE ANY.

CREATE DATA LV_DATA TYPE C.

ASSIGN LV_DATA->* TO <FS_PARA>.

<FS_PARA> = 'X'.

WA_PARAMETERS-NAME = 'CLOSE_WINDOW'.

WA_PARAMETERS-VALUE = LV_DATA.

INSERT WA_PARAMETERS INTO TABLE IT_PARAMETERS.

CLEAR WA_PARAMETERS.

CALL METHOD LO_WINDOW->IF_WD_VIEW_CONTROLLER~FIRE_PLUG

EXPORTING

PARAMETERS = IT_PARAMETERS

PLUG_NAME = 'EXIT'.


I am not able to understand the cause as values are passing perfectly however not getting desired output.

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Posted on Jul 21, 2014 at 09:25 AM

    Hi Shiromani,

    Go to the window, and make sure that the outbound plug 'EXIT' is marked as interface and also chosen the plug type 'EXIT Plug'.

    Regards,

    Rama

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi,

      You cannot access method parameters using wd_assist.

      Sample:

      wd_assist->link_created(

      importing

      id_application_id = ld_application_id )

      Here: id_application_id is parameter from method LINK_CREATED, check out if it is of type returning, if so

      wd_assist->link_created(

      receiving

      id_application_id = ld_application_id )

      Hope this helps you.

      Regards,

      Rama

  • author's profile photo Former Member
    Former Member
    Posted on Jul 21, 2014 at 09:42 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 21, 2014 at 11:13 AM

    Hi Shiromani,

    Try using the code below instead:

    * To Close Window

    data : LO_API_V_MAIN type ref to if_wd_view_controller,

    LO_WINDOW type ref to if_wd_window_controller,

    IT_PARAMETERS type wdr_event_parameter_list,

    WA_PARAMETERS type wdr_event_parameter,

    LV_DATA type ref to data.

    field-symbols <fs> type any.

    LO_API_V_MAIN = wd_this->wd_get_api( ).

    LO_WINDOW = LO_API_V_MAIN->get_embedding_window_ctlr( ).

    WA_PARAMETERS-name = 'CLOSE_WINDOW'.

    create data LV_DATA type c.

    assign LV_DATA->* to <fs>.

    <fs> = 'X'.

    WA_PARAMETERS-value = LV_DATA.

    insert WA_PARAMETERS into table IT_PARAMETERS.

    LO_WINDOW->if_wd_view_controller~fire_plug(

    exporting plug_name = 'EXIT'

    parameters = IT_PARAMETERS ).

    endmethod.

    Regards,

    Ashvin

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.