How to fire outbound plugs of a window?

I have a component which I want to re-use in applications. The component should have 2 outbound (interface) plugs which can be wired into parent applications. When the user clicks buttonA in the component it should fire outboundPlugA, likewise for buttonB we have outboundPlugB. My problem is that I can only seem to fire outbound plugs of the view and not of the window.
Until now, we've solved this by firing interface events of the component controllers but it seems plugs would be more elegant.
How does one fire outbound plugs of the window?

OK, I've done what you said and have the following in the event handler (action of a button) in my view:
  DATA:l_ref_test TYPE REF TO ig_comp1_window.
  l_ref_test = wd_this->get_comp1_window_CTR( ).
The compiler error message is:
Method "GET_COMP1_WINDOW_CTR" is unknown or PROTECTED or PRIVATE.
This method does not exist as far as I can see.

Similar Messages

  • Fire Outbound-Plug of Window in Componentcontroller

    Hello,
    i have defined a Component Interface Definition with an Interface-View (ZYEX_CID).
    One WD component (ZYEX_C) implements this ZYEX_CID.
    I have defined an additional outbound-Plug TO_X in Window inherited from ZYEX_CID.
    In the component controller of ZYEX_C i fire this additional outbound-Plug (component controller of ZYEX_C uses the window controller).
    At runtime an error is issued - outbound-Plug TO_X does not exit in ZYEX_CID.
    Error occurs only if i use ZYEX_C in another WD-Component via interface ZYEX_CID.
    Implementation of ZYEX_CID is provided via Application configuration.
    If i use ZYEX_C directly (not via interface) error ist not issued.
    Thanks.
    Regards
    Paul

    Hi ,
       Just check the provided out bound plug is marked as interface plug .  Then only you can fire this plug from the using component .

  • How to make outbound plug to Public attr

    Hi All,
               I am trying to call outbound plug from get_v method for f4 help. But when i click on f4 help, it getting dump by giving below error.
    View 'ZXXXX/GeneralData' does not have the public outbound plug 'OP_FINDXXXX' for value help navigation
    In get_v method, using below piece of code.
         CREATE OBJECT rv_valuehelp_descriptor TYPE cl_bsp_wd_valuehelp_navdescr
         EXPORTING
          iv_outbound_plug = 'FINDXXXX'.                    "#EC NOTEXT
    My concern is how to make Outbound plug to public or if there any other way to call Outbound plug from Get_v then please advice.
    I appriciate your suggestion.
    Thanks
    RI

    Hi Imran!
    To make outbound plug public please do the following things:
    1)In BSP_WD_CMPWB: go to the code of your outbound plug and switch to edit mode;
    2)Save & Activate your outbound plug.
    3)Menu "Go to" -> "Method Definition"-> tab "Attributes":
    - set "Visibility" = Public
    - "Event" block: "Active" should be marked.
    Warning: after changing of visibility the content(code) of method will be removed automatically!
    So, save it beforehand.
    4) Then go to method and try to do save and activate.
    You will get a error message. Double click at this message - so you will be redirected to the error place - protected section of the current class.
    5) Find out in this protected section the rows with your outbound plug - cut out them.
    6)On the toolbar you will see button for public section - go there and past you rows there.
    7) save and activate everything.
    8) Now you can fill your outbound plug with your logic and activate again.
    I did this just recently many times and it worked fine.
    Please tell me if something is unclear or doesn't work.
    Good luck!
    Evgenia

  • How to fire resume plug?

    hi experts,
            when we make suspend plug in window in componet X  and call another application of component Y through URL of that application. If i have already made resume plug of component X.  So after switching over to Y application how should i come back to application X through resume plug.
    Please revert back.
    Thanks,
    Saurin.

    1. create a event EXIT_EVENT in Component controller
    2. create a method CALL_EXIT_EVENT in component controller.
    3. write code in CALL_EXIT_EVENT to fire event EXIT_EVENT.
    4. create a event handler method CALL_EXIT_PLUG in window of application Y which will fire on event EXIT_EVENT.
    5. write code in CALL_EXIT_PLUG to fire exit plug of Y.
    now you can call CALL_EXIT_EVENT to exit from application Y and to resume to X.
    there is no need to pass url of X in exit plug.
    that's it. u r done...

  • How to link Inbound plug between 2 windows

    Dear All,
    I create a linktoaction link,
    and I want come out when I click this link then windows.open a new view in other windows,
    by the way have some data transfer between 2 views,
    if 2 viewes in one windows is easy ,but my task is in  2 different windows !!
    I don't know  how to use Inbound plug or Outbound plug ?
    can you help me  ?

    Doke,
    In a Web Dynpro project, only applications can be addressed by a URL. So, trying to get a URL for your new Window may not be possible. There are 2 ways to get past this issue though.
    1. Use the approach suggested by Satyajit in [this Blog|https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/7143].
    or go this way. I tested this and it works.
    2(a). In your popup window, 'Win_Popup' embed an 'Interface View' say"Popup_InterfaceView".
    2(b). Assign a plug of type 'Startup' to this Interface View and to embedding Window too if you are using CE 7.1.
    2(b). Create a new Application say "Popup_App"and assign your newly created Interface View "Popup_InterfaceView" as its target.
    2(c). Get URL for this new application like this.
                 String deployableObjectName = wdComponentAPI.getDeployableObjectPart().getDeployableObjectName();
                   try {
                            WDDeployableObjectPart deployableObjectPart = WDDeployableObject.getDeployableObjectPart(
                            deployableObjectName,"Popup_App",WDDeployableObjectPartType.APPLICATION);
                            String urlToTargetApp = WDURLGenerator.getApplicationURL(deployableObjectPart);
                   catch (WDURLException e)
                          messageMgr.reportException(e.getLocalizedMessage(), false);
    2(d) Use the generated URL for navigation.
    IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(urlToTargetApp ,"title");
    wdContext.currentContextElement().setWindowRef(window);
         window.setWindowSize(300, 300);
         window.setWindowPosition(50, 50);
         window.setTitle("Title Name");
         window.open();
    This works.
    Hope this helps.
    Vishwas.

  • Fire outbound plug of interface view controller?

    Hello Experts-
        In my WD project I have two apps A and B.
        I need to navigate from app A to app B.
        In the interface view controller of app A, I have created an outbound plug called GotoB.
        I determine the URL of app B using the WDURLGenerator and store that value in a string.
        In a view of the app A I have the code:
    <code>
    wdThis.wdGetAInterfaceViewController().wdFirePlugGoToB("URLtoB");
    </code>
        For some reason nothing seems to be happening when the event triggers in the view of app A that runs the above code. The view of app A just seems to refresh. The one thing that does happen is that on the refreshed view of app A if I click on the button to trigger this event again I get an 'app A has expired' WAS error.
        What am I missing here? How can I make the navigation from app A to app B work?
    Thank you,
    - Vik.

    Hi,
    well step by step:
    1) Create component Component1 (package="com.sap.sdn", window name = "Component1CW", View name="Conponent1CV")
    2) Create component Component2 (package="com.sap.sdn", window name = "Component2CW", View name="Conponent2CV")
    3) Create application "App1" (package="com.sap.sdn", Web Dynpro component="Component2", the rest - by default)
    4) In Component1CWInterfaceView create outbound plug "GoToComp2"
    5) In Conponent1CV add Component1CWInterfaceView as required controller
    6) In Conponent1CV add button and in action handler put following:
      public void onActionGoToComp2(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionGoToComp2(ServerEvent)
        wdThis.wdGetConponent1CWInterfaceViewController().wdFirePlugGoToComp2();
        //@@end
    7) In component Component2 add Component1 as Used Web Dynpto Component (name="Component1CU")
    8) In Component2CW embed view (Component1CWInterfaceView) as Embed Interface View of a Component Interface, and set this view as default.
    9) In Component2CV add inbound plug "FromComponent1"
    10) In Component2CW link embedded View Component1CU.Conponent1CWInterfaceView.GoToComp2 with Component2CV.FromComponent1
    11) Build-deploy-run. Click on button. It should work.
    Regards, Maxim R.

  • Why does fire outbound plugs sometimes don't work

    Hello.
    Can someone of you tell me what the reasons are that sometimes the firing of a outbound plug don't do the navigation?
    Many thanks,
      Mathias

    Check in the window if you have created the navigation link between the views. After defining the plugs, only if the navigation link is created, the plug will be fired properly. This could have been missed, have a look.
    Regards,
    Nithya

  • How to fire a plug when opening a comp as a popup

    I am opening a WD component as a popup using cl_wdr_runtime_services=>display_view_in_popup().
    Unfortunately, the default inbound plugs of the window or the view are not called when I go this wy.
    Is there anything I can do? How can I make sure that the inbound plug handler(s) are called when opening the comp. in a popup?

    Hi Daniel,
         You can make it Inbound Plug as Default. then system automcatically will call that inbound plug handler method when you open this window.
    Step:
          In Window, Just right click on the Inbound plug and you will get a small popup , in that pop up select  Set as Default .
    Regards,
    Vijay

  • Fire outbound plug from view in a DC to the interface view.

    I have a DC1 which has a view.From this View I fire a outbound plug with a string parameter to an interface View's inboundplug with the string parameter.This view is in another DC2 and used DC in DC1.
    Now when I try to Build the DC1,I get build error with the error log saying that the plug parameters arent compatible.But both the parameters are of same type.

    Hallo Kent,
    as long as your Comp A component keeps alive it also keeps it state when leaving it via navigation. By setting its lifecycle property as "manual" you can manage the lifecycly of Comp A on your own. This means the Web Dynpro Java Runtime will not destroy this component instance when leaving it via navigation.
    To navigate back you can apply the cross-component navigation technique I described within my tutorial on https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/webcontent/uuid/751d003a-0b01-0010-8996-afbaa3fd5339">cross-component [original link is broken] [original link is broken].
    Regards, Bertram

  • Fire OutBound Plug --- Not Working

    Hi,
    I have a Window with 2 Views. I have put 2 Naviagtional Links for the Plugs accordingly. I have a Button/Link available in View1 and want to Navigate to View2 on the action of the Button or Link. Strange thing is , When I perform the action, nothing happens. I refresh my Iview on my portal, and then when I perform the action, it works fine. I have never faced any problem in Navigation by firing plugs ever before. Can anyone suggest what coudl have gone wrong ?
    Regards,
    Murali.
    Message was edited by:
            Muralidaran Shanmugham

    Once we deleted the Instance of the Model, the problem got solved.

  • Fire Plug from one window to another

    Dear All,
    Is it possile to fire an outbound plug from one window to another?
    I am using a Popup window and on clicking a button in the popup window, I want to navigate to another view in the parent window.
    I know there are other ways to handle these kind of scenarios like using an eventhandler in the parent view and them firing a plug, but that would affect the rest of the applicatin flow.
    So I cannot avoid firing the plug from the view in the popup window.
    Can it be done?
    Thanks and regards,
    Mayuresh

    Hi Mayuresh Kanvinde ,
          I believe your popup is a modal window. If so in your action handler of the button on the popup window you can hide the popup window and then fire the navigation plug of your parent window.
       Your popup button action handler can call a method in your component controller where you can write the code to hide the existing popup window and then fire the plug in your parent window.
       make sure you store the IWDWindow object of your popup window on the context so that you have access to it to hide the popup window.
    Regards,
    Sanyev

  • Web Dynpro: several navigation links connect to one outbound plug of a view

    Hi,
    I have two questions in general Web Dynpro. (I have not found precise answer for the question yet)
    1) What should happen in the following case?
    We have three views in a component. The outbound plug of the first view is connected to the inbound plug of the second and third view via navigation links. Which view should appear, if i fire the outbound plug of the first view?
    Some documentation says, this case is not allowed, some documentation says it is allowed...
    2) If the previous case is allowed, what should happen in the following case?
    In a child component, a window outbound plug is connected to a view inbound plug. Beside this, I implement an inbound plug of the window, where i fire this outbound plug of the window.
    Now, the interface view is embedded into a parent component window. In the parrent component I connect the outbound plug of the interface component to an inbound plug of a parent view (which is also embedded into the window). I also connect an outbound plug of the parent view to the interface view inbound plug.
    What will happen if I fire the parent view outbound plug? Will the parent view or child view appear?

    Hi Huszar,
    I'm a newbie and found your question interesting. So I played a little with this issue and hope I found something to help you.
    But  I wonder in why you want to use such a constellation the first place. What is your purpose? For me the idea itself doesn't make much sense... Did you by chance actually think of one of the following purposes:
    You want two different action elements (e.g. 2 buttons) to fire different conenctions. Then you should use different outbound plugs. Connect the two buttons and the two links to different methods so that the corrsponding plug and button have the same method.
    You want to decide by value or state which view to show. Then you should use two different outbound plugs as well and decide in the button's event handler mehtod which plug to fire , e.g.: if <condition> then <firePlugA> else <firePlugB>.
    Generally, if you connect two views in a window via link you must chose a method to use or create a button. If you chose a method (event handler) the effect in the Java file is that the  method (onActionButtonX()) will call the corresponding firePlugOut-method.
    Unfortunately in the firePlug-method itself there was no hint about the plug's destination. As I connected the same method for button and two plug targets, Web Dypro for no obvious reason always chose the same target. I did not find a possibility to directly chose the target from one outbound plug, so I guess this information is stored somewhere in the background logic.
    Did I get the point or did you think of something completely different? Or maybe you just asked theoretically? In that case I don't seem to get the idea.
    Kind regards,
    Jana

  • Why do we need mention explicitly for Outbound plugs?

    Hello
    When i see a existing custom WD component's my_view's method code (action is APPROVE), i  see the below code
      wd_this->fire_tomain_plg( ).
    I also saw that MAIN view is the outbound plug for my_ view.
    1) Is this code is telling to the system that, it should navighate to MAIN view?
    2) if so, already we put this (TOMAIN) in OUTBOUND tab righ? why again having this piece of code EXPLICITLY in our method?
    3) is we (developers) need to put this manually? or or systme will put it at the bottom of the method automatically?
    4) but i did not see any such code for INBOUND PLUGs? why?
    Thank you

    ABAP_SAP_ABAP wrote:
    Hello
    >
    > When i see a existing custom WD component's my_view's method code (action is APPROVE), i  see the below code
    >
      wd_this->fire_tomain_plg( ).
    >
    > I also saw that MAIN view is the outbound plug for my_ view.
    >
    > 1) Is this code is telling to the system that, it should navighate to MAIN view?
    >  YES.
    > 2) if so, already we put this (TOMAIN) in OUTBOUND tab righ? why again having this piece of code EXPLICITLY in our method?
    >  In the outbound tab, you are specifying list of outbound plugs which can be used. however you need to fire the correct outbound plug via coding.
    > 3) is we (developers) need to put this manually? or or systme will put it at the bottom of the method automatically?
    >  You need to fire outbound plug for navigation. You can use WDA wizard to do that.
    > 4) but i did not see any such code for INBOUND PLUGs? why?
    >   We maintain navigation link b/w outbound and inbound plug at Window. This will automatically fire inbound plug corresponding to outbound plug.
    > Thank you

  • Why do we use inbound and outbound plugs in abap webdynpro?

    hi all,
    why do we use inbound and outbound plugs in abap webdynpro?
    Thanks

    Actually we have 2 types of plugs
    1.View plugs
    2.Window plugs/Interface Plugs
    plugs are for navigating one view to the other and also you can pass the parameters along with the plugs.
    Outbound plug is to navigate from one view to other view,also we can pass parameters along with the plug.
    Inbound plug is like event handler/receiver of the outbound plug.
    Using window plugs we can call other Web Dynpro applications.for more information check this link.
    http://help.sap.com/SAPHELP_NW04S/helpdata/EN/45/19bf8c16f25d7ae10000000a11466f/frameset.htm
    Thanks
    Suman

  • Fire WindowInterfaceView outbound plug

    For my webdynpro I use cross-component navigation.
    From ComponentA, ViewA i'm using a plug to navigate to ComponentB, ViewB.
    Now I want to navigate back to ComponentA, ViewA when the user press Cancel.
    I created a outbound plug in my WindowInterfaceView with a link to the inbound plug from viewA.
    How can I fire this plug in the WindowInterfaceView from ViewB?
    Regards,
    Björn

    Hallo B.
    what's the problem? You just apply the same technique twice.  You navigate back to CompB from CompA just like you navigated from CompB to CompA before?
    You declare an additional outbound plug on the interface view of CompB and link it to an interface view inbound plug of CompB.
    Firing the outbound plug from WindowInterfaceView (you mean ComponentInterfaceView which is 1:1-related with a Window inside the component) is explained in the tutorial:
    public void onActionNavigateBackToUICompB( com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, int targetView )
    //@@begin onActionNavigateBackToUICompB(ServerEvent)
    wdThis.wdGetUICompAInterfaceViewController() .wdFirePlugBackToOtherCompOut(targetView);
    //@@end
    I allready adapted the code to your question.
    Regards, Bertram

Maybe you are looking for

  • Load a sales order with delivery date in the past

    Hi, We want to load in the system a sales order with delivery date in the past, and maintain the schedule delivery date in the past. To do that, in the customizing Sales And Distribution / Basic Functions / Delivery Scheduling and Transportation Sche

  • Change DATA at SAVE for ITEM

    Hi all. I must modify a date when SAVE an item (date ACTUAL_FINISH). I have implemented the interface /RPM/IF_EX_ITEM_API, but ther isn't methods for modifiy the datas of item. You have others BADI to suggest to make this? Thanks! Vanessa

  • Value tolerance in PO for Material purchase

    Hi, In PO, value tolerance to be given for Material Purchase in Service orders where both Service Line item(item Category D) and material line items will be there(account assignment K) How it's possible? Regards

  • Auto code generation

    Hi everyone, I am new to using LabVIEW (I've come from a background of C/C++, Java, Perl, etc...) and have learned quite a bit about using LabVIEW 7.0.  But what I am finding is that it is horrible about code reuse.  Apparently, from what I can gathe

  • When will Raw be updated for Canon Rebel T4i

    When will the Adobe Elements plugin for "RAW" be updated for the newest Rebel camera?