cancel
Showing results for 
Search instead for 
Did you mean: 

Return from popup to source component

Former Member
0 Kudos

Hi Experts,

Below is my scenario:

1. There are 2 components - A & B, each having 2 views VA1, VA2 & VB1, VB2 and 2 windows WA1, WA2 and WB1, WB2.

2. VA1 is embedded into WA1, VA2 in WA2...... and..... VB1 in WB1 and VB2 in WB2..

3. I have to call WA1 as a POP-UP in VB1 (means calling the VA1 as a pop-up in VB1)

4. Popup has 2 buttons - YES/NO

5. Now, When I click YES, the screen should navigate to view VA2(in 1st component)....

Problem:

When I call the window WA1 as pop-up in VB1, popup is generated successfully, BUT. when i click on YES button, the outbound plug fires to the inbound of Window WA2 to call the next view i.e. VA2...... and this view is shown in the Pop-up window only... which means, the pop-up is not getting closed, and is opening the next window/view in the same pop-up size window.

Please suggest how can I trigger the outbound plug in such a way, that my pop-up is closed and the next view is shown (in the source component).

Any example code, or reference to any class/method will be helpful.

thanks!

prateek

Accepted Solutions (1)

Accepted Solutions (1)

former_member211591
Contributor
0 Kudos

Hi Parteek (or Parteek? ),

I solved it:

Idea is to fire an event when YES is clicked and thus to trigger the navigation to VA2.

1. Create interface-event YES_CLICK at comp-ctrl of component A (CA)

2. Fire event and close popup when Yes is clicked.

(ONACTIONYES = Method which is executed by button Yes.)

3. Create interface inbound plug FROM_YES for window A2.

We will use this inbound plug to navigate here when yes is clicked.

4. Create outbound plug create outbound plug TO_VA2 for window 1 of component B.

5. Add component usage ZCA_USAGE to the window controller for window b1.

We need the usage here to create the navigationlink between outbound plug TO_VA2 and inbound plug FROM_YES.

6. Embedd window A2 as a view into window b1 and create navigationlink between outbound plug TO_VA2 and inbound plug FROM_YES.

7. Got to methods-tab of window controller b1 and create event handler NAV_T0_VA2 for event YES_CLICK of comp-usage ZCA_USAGE

8. Fire plug TO_VA2 in method NAV_T0_VA2.

Activate everything and go!

Clicking yes opens:

BR,

ismail

Former Member
0 Kudos

Hi Ismail,

Thanks a lot for your helpful answer. I solved it the same way just before checking your reply.

But, thanks a lot

regards,

Prateek

Answers (1)

Answers (1)

prathamesh_gandhi
Participant
0 Kudos

Hi Prateek,

Try this,

on click of YES button get the instance of popup window and then close that window.

e.g. LR_WINDOW->CLOSE().

then trigger the navigation code.

Former Member
0 Kudos

Hi,

I did this, but in this case, once the window is closed, it is not triggering to the other view... i have tried to do this.

Even tried to call FIRE_PLUG method of IF_WD_WINDOW which dynamically triggers the outbound plug, but no success.

do i have to play with some custom events ?