Skip to Content
0
Former Member
Oct 29, 2013 at 08:56 AM

closing POPUP window repeatedly

731 Views

I am facing an issue when generating popups multiple times in webdynpro. Basically a popup to confirm action has to be generated. The steps are:

1. I have created a window/view - WINDOW1 and VIEW1 and assigned the view to the window.

2. In the component controller, I call window WINDOW1 using IF_WD_WINDOW->CREATE_WINDOW( ) based on user action.

3. In WDINIT of the view VIEW1, i create a popup window using IF_WD_WINDOW->CREATE_WINDOW_AS_POPUP( ) with 2 buttons (Yes and No) and subscribe 2 actions to this window. The actions are created in VIEW1.

4. in both actions, after required logic, i close the window using the following reference

lo_window = wd_this->wd_get_api( )->get_embedding_window( ).

lo_window->close( ).

5. On executing, the first time, i see the popup window, i click on yes/no and the window closes.

6. On executing again, the WINDOW1 appears on top of the popup window. (blank popup over confirm action popup).

How do I create a popup window from CONTROLLER with actions to close the window - as we cant assign actions in a controller. Is there anyway to avoid the WINDOW1 on display and just display the popup to confirm?

Regards

Vikram