cancel
Showing results for 
Search instead for 
Did you mean: 

Modal window in portal and navigation

Former Member
0 Kudos

Hi I have Application A and Application B which has a Main Component and a Popup Component.

Everything runs in Portal.

I am navigating from Application A to Application B. With B Main starts in background and Popup is shown in front.

Now I have a button in the popup for navigating back to Application A. Navigation works fine, but the popups isn't closed. So I can see application A in background but the popup of Application B in the front. In this state I cant use the Application and have to reload the portal with F5.

Using Windows 7 and latest IE8.

Any hints are appreciated.

Best regards,

hhermann

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Any other suggestions ?

Former Member
0 Kudos

Hi,

my code, looks like your solutions, so I tried everything in this thread, nothing works for me.

What I noticed, I changed my plug from "Exit" to "Standard". Then the popup is getting closed, but the navigation does not work anymore.

Do I change to "exit" the navigation works but the popup isn't getting closed.

Very strange...

Best regards,

hhermann

chengalarayulu
Active Contributor
0 Kudos

If you are not able to close, you can define window reference at AssistanceClass level, instead of component controller. It should work, check once again.

Former Member
0 Kudos

How can i get the reference in the assistance class ? There is no wd_context or wd_this or sth. ... ?

Best regards,

hhermann

chengalarayulu
Active Contributor
0 Kudos

however you are defining attribute at component controller, just go to attributes tab in Assistance Class, and there you can define.

lr_window type ref to IF_WD_WINDOW,

while assigning the reference at component level, you will use

WD_ASSIST->lr_window = lo_window.

while closing:

WD_ASSIST->lr_window->close( ).

Former Member
0 Kudos

Still the same effect!

Without portal, starting in SE80 everything works perfect!

In Portal the popup isn't getting closed.

Best regards,

hhermann

chengalarayulu
Active Contributor
0 Kudos

HH,

just create an attribute under component controller... follow the below.

1. create an attribute type ref to IF_WD_WINDOW at component controller level(ex. lr_window)

2. come to your main view(screen 1 of Application-B), write the below line of code where you are generating popup window.

     wd_comp_controller->lr_window = lo_window.

3. Now in Ok button/submit/back button of your popup window, write the below before navigating to Application-A.

     wd_comp_controller->lr_window->close( ).

clear:    wd_comp_controller->lr_window.

4. Now test the application.

Abhijeet-K
Active Participant
0 Kudos

Hi Heinrich,

While 's solution is perfect, you can also specify the close_in_any_case parameter as abap_true, when you create the popup. I presume you use method create_window of interface if_wd_window_manager for rendering the second application in the popup.

Former Member
0 Kudos

lets say you have some action button that that trigger the exit , e.g. SAVE, or Exit or Close button 

write this logic in the action method.

data:

            l_api         type ref to if_wd_view_controller,

            l_window_ctlr type ref to if_wd_window_controller,

            l_popup       type ref to if_wd_window.

            l_api         = wd_this->wd_get_api( ).

            l_window_ctlr = l_api->get_embedding_window_ctlr( ).

            if l_window_ctlr is bound.

            l_popup       = l_window_ctlr->get_window( ).

           l_popup->close( 'l_popup' ).

            endif.

  

OR

if you are doing event based programmin then fire the exit plug event and you can programm close the window on that event.

refer below link

http://help.sap.com/saphelp_nw70/helpdata/en/45/1bc575ba064574e10000000a114a6b/frameset.htm