cancel
Showing results for 
Search instead for 
Did you mean: 

call outbound window plug from event triggered from embedded view

Former Member
0 Kudos

Hi,

I have created an application that is calling another application from within. When I'm inside the embedded application, I want to be able to go back to the initial application. I'm trying to call an outbound window plug, but I'm not sure how to hook up the event from the button in the view to call the plug in the window to call it.

Hope this makes sense.

Thanks,

Kevin

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can create an Exit plug in the Interface Window of the embedded appliaction and on click of some button or on some action you can fire the Exit Plug of the Interface Window

1. Add the Interface Wuindow as the required controllers in the View/Controller from which you need to fire the plug

2. On the Action use the similar code

wdThis.wdget<interfaceWindow>Contreoller.wdFirePlug<Nameof the ExitPlug>.

Regards,

Raju Bonagiri

Former Member
0 Kudos

Hi Raju,

Sorry for not getting back sooner.

So, I created an Exit Plug in the MAIN_WINDOW of the embedded app. I go into the main app, and go into the MAIN_WINDOW of the main application, and I see the exit plug from the MAIN_WINDOW of the embedded app, and I have created a navigation link to an inbound plug in the main app.

I go back to the embedded app, and I placed the following code:


  DATA: view_cont TYPE REF TO if_wd_view_controller,
        window TYPE REF TO if_wd_window_controller.

  view_cont = wd_this->wd_get_api( ).

  window = view_cont->get_embedding_window_ctlr( ).

  window->fire_plug( plug_name = 'TO_POS_MGMT_APP' ).

Works perfectly, except for some reason, I haven't figured out why i'm not passing my parameters from the embedded app to the main app.

Sorry, forgot to add that in the fire_plug method, I call the actual plug:


*----- go back to the ZHR_POS_MGMT app start screen
  wd_this->fire_to_pos_mgmt_app_plg( action = wd_assist->c_start ).

So, as you can see, I've created a parameter called action, and assigning it a constant to send back. When debugging, the variable hasn't made it's way back...

Any thoughts?

Cheers,

Kevin

Edited by: Kevin Schmidt on Sep 14, 2010 8:05 PM

Former Member
0 Kudos

Hi Kevin,

The parametr Action will be sent to the event handler . In the onPlugFrom Action of the main application we need to add another paramet named Action and in that method we will have the value of the constant which you passed from Embedded App.

Regards,

Raju Bonagiri

Former Member
0 Kudos

Hey Raju,

So I added the ACTION parameter to the inbound plug, but when I look at the WDEVENT, it's blank... heven't figured it out yet. Now, when I call the plug from the window controller, I have to pass the parameters through a PARAMETERS hashed table of type WDR_EVENT_PARAMETER_LIST. I'm just having issues with assigning the value since it's type is DATA. keeps giving me grief.

Kevin

Former Member
0 Kudos

Hey Raju,

Just got it figured out... thanks for all the help!

Cheers,

Kevin

Answers (1)

Answers (1)

ChrisPaine
Active Contributor
0 Kudos

Hi Kevin.

have a look at the suspend and resume functionality of WDA.

[ Suspend and Resume Calls|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/45/19bf8c16f25d7ae10000000a11466f/frameset.htm]

is this what you are trying to accomplish?

if not I'm not sure how you are "embedding" the second application, could you please elaborate.

Thanks,

Chris