on 2012 Nov 24 10:24 AM
Hi experts,
I have a main window W1 and a view V1 embedded in it, popup window W2 and view V2 embedded in it.
On a click of button B1 from view V1 popup window W2 will get open with view V2 having button B2.
Now my requirement is that on click of button B2 form the popup screen i have to fire an event,
which is declared in the component controller and handled in view V1.
Below are the details:
gv_popup type ref to if_wd_window. (Defined in component controller attributes)
Z_EVENT : Declared in component controller.
On action B1 in main window W1:
DATA: lr_view TYPE REF TO if_wd_view_controller,
lr_api_main TYPE REF TO if_wd_component,
lr_window_man TYPE REF TO if_wd_window_manager.
lr_view = wd_this->wd_get_api( ).
lr_api_main = wd_comp_controller->wd_get_api( ).
lr_window_man = lr_api_main->get_window_manager( ).
*Creating the Popup Window
CALL METHOD lr_window_man->create_window
EXPORTING
* modal = abap_false
window_name = 'W2'
title = 'Pop Up'
close_button = abap_true
RECEIVING
window = wd_comp_controller->gv_popup.
* Opening popup window
wd_comp_controller->gv_popup->open( ).
On action B2 in popup window W2:
wd_comp_controller->gv_popup->close( ).
wd_comp_controller->fire_Z_EVENT_evt( ).
Now the problem here is that event is getting triggered but popup window is not getting closed.
If i am simply closing the window and not firing the event, it is getting closed.
I have tried closing the window in the event handler in view V1 but no success.
In side the event handler m calling another application which will leave this application on suspended mode,
i think here is the problem. Because when i commented the code to call the another application the window gets closed.
Thanks in advance..
Hi Saipriya Bandar,
You open a modal popup w2 that belong to w1, it means in w1 program wait w2 to ended/closed before continue the process.
In this pattern, normally you just keep the result of w2 then w1 will check the result and process the result.
To solve your problem, in b2 action you just put a status to a global variable that b2 was pressed and close the window. then, in w1 (below: wd_comp_controller->gv_popup->open( ).) your check the status and call the process to that status belong to be.
Best regards,
Rosman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
68 | |
9 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.