Fire window plug from another component

Hi,
I want to fire a plug which is created in the window of one component, from the view of a different component.
Is this possible?
Any information would be much appreciated.
Thank you!

Hi Christian,
thank you for the tip.
But if I do this in that way then I get a new strange problem:
I have a main component and two sub-components A and B. The views from component A and B  are embedded in a view container of the main component. So either component A or component B is displayed in the main view.
Now I fire the outbound plug in A (which is connected to the inbound plug of the main window).The main windows inbound plug handler fires the corresponding outbound plug connected to the view of component B.
Now the strange behavior is the main view will be displayed twiced. The second one is included in the first one.
Starting view:
| main view
|  __________
|  | view A
|  __________
After firing the plug:
| main view
|  __________
|  | main view
|  |  ________
|  |  | view B
|  |  ________
|  __________
Regards
Thorsten

Similar Messages

  • Call an Startup-Plug from another WDA

    Hello.
    How can I call a Startup-Plug from another WDApplication with a table-Parameters.
    I get the URL from the Method cl_wd_utilities=>constuct_wd_url.
    thanks for helping
    Edited by: Marcus Ventur on Dec 2, 2008 11:33 AM

    Hi,
    Try to start your secondary application with a URL Parameter,
    then fire any plug you want by checking the parameter,
    hope it helps,
    regards

  • Fire out plug from InterfaceView

    Hello,
    i want to check authorization for my WebDynpro-Components.
    I want to use an Authorization component, so that other components can use this component. If authorization is ok, the authorization component should fire an out plug for the using component. The out plug is created in the interface view, because the using components can plug this component only via the interface view (am i wrong?). I find no way to fire the out plug of the authorization component, because i cannot access the interface view from inside the component. Can anyone helps me?
    Thanks and regards,
    Matthias

    Hi,
    I dont think you can fire a plug from the child component to some view of the parent component.
    What you can do is, create an event in Child component. which has a authrization parameter (boolean).
    After the authorization check is done , raise the event from the child component with authorization status (success(true)or failure(false)) as the parameter to this event.
    Read this in the parent component.. and then fire the plug to the approprite view from the parent component itself.
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/24/243ca46e1c334f8a6f8b0792656bc7/content.htm">Check this for more details on implementation</a>
    Regards
    Bharathwaj

  • Callinfg ALV from another component

    Hi all,
    We have a main component in which on press of a button we need to show alv which is in another component.
    I am trying to follow these steps but i need your inputs
    1. I have declared the component which calls alv in used components
    2. In the main view of my component i have placed a VCU
    3. In the window of the main component i have embedded that VCU and embedded the view of the component which calls the alv.
    Now how can i call alv on press of that button ?
    Please let me know your suggestions
    Regards
    Bhanu

    Hi,
    Aditya has the right idea in my opinion. I always do things this way (altering visibility) because 1. it's easiest and 2. you don't have initializing problems. Here's how you can do it:
    First of all, set your ViewContainer invisible in design time.
    1. Go to the Component controller of your main component (where your ViewContainer is in), go to attributes
    2. Add an attribute Z_GO_VIEW, Public, Type ref to, IF_WD_VIEW.
    3. Go to your View of the CC where the VC actually is in.
    4. Go to hook method WDDOMODIFYVIEW
    5. Add the following code:
    IF first_time = abap_true.
        wd_comp_controller->z_go_view = view.
    ENDIF.
    --> now you have the instance of your view interface.
    6. Make a button
    7. In the event handler method of the button, code something alike to this:
    DATA:
           lo_el_ui_root      TYPE REF TO cl_wd_uielement_container,
           lo_el_trans_cont1  TYPE REF TO cl_wd_uielement_container,
           lo_el_button1     TYPE REF TO cl_wd_button.
    DATA: lv_visibility TYPE WDUI_VISIBILITY.
    lo_el_ui_root ?= wd_comp_controller->z_go_view->get_element( 'ROOTUIELEMENTCONTAINER' ).
    lo_el_trans_cont1 ?= lo_el_ui_root->get_child( ID = 'TC_ONE' ).
    lo_el_button1 ?= lo_el_trans_cont1->get_child( ID = 'I_AM_THE_MIGHTY_BUTTON' ).
    lv_visibility = '02'.
    lo_el_button1->set_visible( value = lv_visibility ).
    This isn't exactly what you'll need but you get the picture: Get the View Instance, Downcast the UI tree for the Element you want to dynamically alter, use the right method for alterations.
    This should solve your problem. If it doesn't, ask us again
    regards, Lukas

  • How I can call controller's functions from another component?

    Hi again!
    I make a few web Dynpro components, for example first for user-data processing, second - for project-data processing. In the controller of 1-st controller there is a function getUserById(). In the controller of 2-nd component I need such function. And I don't want to make a dublicate for this function in the controller of 2-nd component. Is there a way to call function in one component from another?

    Hi,
         Yes, you can reuse the component. There are two basic types of component communication. 1. Intra Component communication 2.Inter Component communication.
    1. Intra Component  communication: The two components must be in same DC(project).
    Procedure:Say there are C1,C2 components in a DC.
    Open C2, Open interface controller, create a similar (_parameters and return type_) method to the method C2. Call C2's method in this Interface method.   
    Open C1, select and right click  Used Web Dynpro Components -> Add Used Component. In the wizard, you can browse and select the C2 component,and enter a name to the usage. Then the usage of the interface <b>must </b>be added in properties required controllers of a view/component controller.
    Now we can use the method that is available in the C1 interface controller.     
    You must define method before declaring usage
    <b>2.Inter Component  communication:</b> The two components are in different DCs
    Open DC metadata of C2. Right click on Public part-> create new Public Part.Enter name-> Next -> Select entity type as Web Dynpro Component in wizard,in Select Entities  select the component ,Finish.
    A structure for public part is created.
    Open C1, Open DC metadata of C1. Right click on Used Dcs-> AddUsed DC. Browse to C2's public part.
    Select Finish.
    regards,
    Siva
    Edited by: Siva Rama Krushna on Dec 19, 2007 10:07 AM

  • Show messages from another component

    Hello,
    I have an application with several components, and I would like to know that I do to show messages from one component to another.
    Thank you

    Thank you for responding, the problem is that we show the messages in sigueinet way:
          CALL METHOD l_message_manager->report_t100_message
            EXPORTING
              msgid = ls_errores-id
              msgno = ls_errores-number
              msgty = ls_errores-type
              p1    = ls_errores-message_v1
              p2    = ls_errores-message_v2
              p3    = ls_errores-message_v3
              p4    = ls_errores-message_v4
              view  = 'ID_BODY'.
    The problem is that it shows us what the component in which we are, which is a POPUP, and we want to show in another component

  • 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

  • How can I call a public function in one component from another component?

    I have two components: Form and Confirmation.  Form is a Canvas and Confirmation is a TitleWindow.
    Form contains several controls and a submit button.  Confirmation contains an OK button.  When the user clicks the submit button, the Confirmation appears over the Form (Form is blurred).  When the user clicks the OK button on the Confirmation, I want to run a function on Form to set some default values in the controls.
    How can I address the function in the Form component from the Confirmation component so I can fire the function?
    Thanks!

    Here is the source
    CustomForm.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300">
    <mx:Script>
    <![CDATA[
    public function callBack(): void {
    lblStatus.text = "Success";
    ]]>
    </mx:Script>
    <mx:Label id="lblStatus"/>
    <mx:Form x="50" y="50" verticalGap="15">
            <mx:FormHeading label="Send us comments" />
            <mx:FormItem label="Full Name:">
                <mx:TextInput id="fullName" />
            </mx:FormItem>
            <mx:FormItem label="Email:">
                <mx:TextInput id="email" />
            </mx:FormItem>
            <mx:FormItem label="Comments:">
                <mx:TextArea id="comments" />
            </mx:FormItem>
            <mx:FormItem>
                <mx:Button id="submit"
                    label="Submit" />
            </mx:FormItem>
         </mx:Form>
    </mx:Canvas>
    CustomTitle.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
    layout="absolute" width="200" height="80"
    showCloseButton="true" close="closeMe(event)"
    backgroundAlpha="1"
    color="#173553" backgroundColor="#EEEEEE"
    headerColors="#FFFFFF, #CBCCCC"
    borderColor="#666666" borderStyle="solid">
    <mx:Script>
    <![CDATA[
    import mx.managers.PopUpManager;
    public var callBack: Function = new Function();
    private function closeMe(event: Event): void {
    PopUpManager.removePopUp(this);
    callBack();
    ]]>
    </mx:Script>
    <mx:HBox width="100%" height="100%" horizontalAlign="center" verticalAlign="bottom">
    <mx:Button id="btnOK" label="OK" click="closeMe(event)" />
    </mx:HBox>
    </mx:TitleWindow>
    TitleWindowSample.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application
    xmlns:mx="http://www.adobe.com/2006/mxml"
    xmlns="*"
    layout="absolute"
    width="100%" height="100%"
    creationComplete="init()">
    <mx:Script>
    <![CDATA[
    import mx.managers.PopUpManager;
    private function init(): void {
    customForm.submit.addEventListener(MouseEvent.CLICK, onMouseClick);
    private function onMouseClick(event: MouseEvent): void {
    customForm.lblStatus.text = "";
    var customTitle: CustomTitle = new CustomTitle();
    customTitle.callBack = customForm.callBack;
    PopUpManager.addPopUp(customTitle, this);
    PopUpManager.centerPopUp(customTitle);
    ]]>
    </mx:Script>
    <mx:VBox
    width="100%" height="100%"
    verticalAlign="middle" horizontalAlign="center">
    <CustomForm id="customForm" width="500" height="300">
    </CustomForm>
    </mx:VBox>
    </mx:Application>

  • How to get a value of attribute/field From another Component/bol

    Hello
    I have to write some code in Component GS_CM/DocList.
    From 'GS_CM' I have to get a value of field attribute-STATUS_CURRENT
    From BT115QH_SLSQ/Details
    Context Node = BTSTATUSH
    Attributes = STATUS_CURRENT
    In order to check and enable some other functions.
    I know how to do it when I'm in the BT115QH_SLSQ/Details
    lr_status ?= typed_context->btstatush->collection_wrapper->get_current( ).
    lv_statush = lr_status->get_property_as_string( iv_attr_name = 'STATUS_CURRENT' ).
    But, in my Componenet GS_CM/DocList  the field  "BTSTATUSH->COLLECTION_WRAPPER->GET_CURRENT" is unknown. It is not contained in one of the specified tables nor is it defined .
    would be very grateful if you could help to solve this issue.
    Thanks In Advance
    Sima

    Hi Sima,
    then another short hint to the WD_USAGE_INITIALIZE.
    Go to the component workbench, open the component BT115QH_SLSQ. Go now to the component controller class, go to it's methods. You will see that in the coding of the Method WD_USAGE_INITIALIZE, on the class CL_BT115QH__BSPWDCOMPONEN_IMPL:
    WHEN 'CUGSCM' OR 'CUGSCM_DET'.
          CALL METHOD iv_usage->bind_context_node
            EXPORTING
              iv_controller_type  = cl_bsp_wd_controller=>co_type_custom
    "          iv_name             = 'ContentManagementCuCo'     "Custom Controller Name
              iv_name             = 'BT115QH_SLSQ/CUGSCMGenCuCo'     "Custom Controller Name
              iv_target_node_name = 'CMBO'      "Name of Node in this Custom Controller
              iv_node_2_bind      = 'CMBUSOBJ'. "Name of Node in used component GS_CM
          CALL METHOD iv_usage->bind_context_node
            EXPORTING
              iv_controller_type  = cl_bsp_wd_controller=>co_type_custom
              iv_name             = 'BT115QH_SLSQ/CUGSCMGenCuCo'"#EC NOTEXT
              iv_target_node_name = 'ATTRIBUTES'                "#EC NOTEXT
              iv_node_2_bind      = 'ATTRIBUTES'.               "#EC NOTEXT
    Now I checked the context on the component controller and it contains the statusH, the node which you want to use in the component GS_CM. So make sure to prepare the GS_CM component by adding the Status context, and afterwards just add the binding in the code I pointed out above.
    Best regards,
    Erika

  • Accessing a Variable from another component

    Hey,
    I have got a main application with different states.. in the
    states I call different components.
    like this:
    quote:
    <mx:State name="products">
    <mx:AddChild>
    <modules:Products/>
    </mx:AddChild>
    </mx:State>
    <mx:State name="add_offer">
    <mx:AddChild>
    <modules:AddOffer bufferedProduct="{}" />
    </mx:AddChild>
    </mx:State>
    In the product component, I have a button which saves some
    information to a variable called "bufferedProduct". after that the
    program leaves the state "products" und switches to the state
    "add_offer", which is a different component. There I need the saved
    information from the "bufferedProduct" variable.
    Now my question, how can I "transfer" the information
    previously stored within the "Products" component in the
    "bufferedProduct" var into the "addOffer" component? Is there a way
    I can do that? Or should I use a different way to build my
    application :)
    this does not work unfurtunately!
    quote:
    parentDocument.products.bufferedProduct
    thx in advance
    pat

    Hey,
    I actually found one answer myself.
    I created a var bufferedProduct in the main app. In te
    Products state, I save the information to
    "parentDocument.bufferedProduct" and then I sent the var to the
    other component like this
    quote:
    <modules:AddOffer bufferedProduct="{bufferedProduct}"
    />
    in the addOffer component I just had to declare another var
    with the same name and thats it.
    thx anyway.
    pat

  • How to call a local variable from another component controller

    Dear Experts,
           I have created 1 component controller(Controller Name as B)and methods.In that methods I Have declared Local variable(For ex data: Lv_flag). I have Created 1 more component and name as A. I used Component B in Component A(Using component usage). In A component controller I have created methods.Now I want to call a local variable Lv-flag in this method from B controller Method. Please reply your valuable answer.

    Karthikeyan,
    Please make sure that flag attribute is under some node, say NODEA. NOW please select the interface node property and input element  of NODEA.
    now NODEA will be available in interface controller. Interface controller acts like a global  controller between two different components.
    So from interface controller you can take that flag value.
    pls reply back if you have any confusion.
    Regards
    Srinivas

  • Unable to fire window.print from HTML control

    Hi,
    I have an AIR application where I use HTML control. I want to fire print command as soon as the page is loaded. I wrote window.print() script on the onLoad event of HTML body tag.
    Somehow this event is not fired. Any thoughts on how to achieve print functionality?
    Thanks,
    Hitesh Patel.

    Hi there
    Perhaps try creating a totally new window definition and configuring the parameters as desired.
    Once in a blue moon we see that the window definition somehow becomes corrupt.
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7 or 8 within the day - $24.95!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • How to consume a method on the interface controller from another component?

    Hello,
    I have a project which contains two Components, A & B.
    I have exposed a method at the interface controller of Component A. How can I consume it from Component B?

    Hi,
       First add ComponentA as a used webdynpro component in ComponentB. Then open the Interface Controller of B and switch to Properties Tab. Select Add in the "Required Controllers" section. From the dialog that appears, select A's interface controller. Then you can access A's method from B's interface controller as:
    wdThis.wdGetAComponentInterface().<method>;
    Regards,
    Satyajit.

  • Make public property of a component and access it from another component?

    Component "alpha.mxml"
    propriety: mapevent_mapready
    Component "beta.mxml"
    <alpha:alpha mapevent_mapready="some_function()" />
    how?

    Hi leonapster,
    Say in your component alpha.mxml
    <!--alpha.mxml -->
    <AlphaComponent>
         public var mapevent_mapready:Boolean=false;
    </AlphaComponent>
    <!-- Beta.mxml -->
    <BetaComponent>
    <mx:Script>
         private function init():void
              //Now you can access the mapevent_mapready property of Alpha Component as below:
              var bool:Boolean = alphaComp.mapevent_mapready;
         alphaComp.mapevent_mapready
    </mx:Script>
    <alpha:alpha id="alphaComp" />
    </BetaComponent>
    Thanks,
    Bhasker

  • How to Access the view from another Component

    Hi,
    Seek your advice on this following requirement.
    1. Would like to add the view OVWindow of Component BTCATEGORIES in an assignment block of 
        CRMCMP_CMG similar to the assignment block exists in the BT116H_SRVO component.
    2. Please provide the step by step procedure to implement this requirement.
    Regards,
    Arif

    Hi,
       I am having view1 and view2.
      in view1 i am using roadmap. S1 is one of the step of road map.
      in view1 i used this code to get the reference of this view in componentcontroller attribute
    Data: lo_api TYPE REF TO if_wd_view_controller.
    If first_time = 'X'.
    lo_api = wd_this->wd_get_api( ).
    wd_Comp_Controller->my_VIEW = lo_api.
    endif.
    in my view2 i want to access the roadmap step
    i dono how to access that.. i used this code.......
             wd_comp_controller->my_view->get_element( 'S1' ).
    is this correct.. If not what is the code to get that id..
    Can any one tell me clearly...

Maybe you are looking for

  • My iphone 4S only charges when plugged in to computer. It doesn't appear anywhere, not even on itunes. Help me please.

    I have tried everything, I did a system recovery on my computer, reinstalled everything. I even reset my iphone 4S like if it was new, I erased everything. I made sure the USB cables are plugged in correctly. I used 2 different USB cables and nothing

  • Webi report takes long time to open

    Hi All. We have created few reports in webi and we have used variables in these reports. But while opening that reports into BI Launch pad browser, it is taking long time to open. e.g. 5 to 7 min or more. Please help to resolve this issue.

  • Error while Posting Payroll

    Hello ,           While  execute posting  run  Payroll . i am getting the error bellow, Posting balance is not cleared (Period 05 / 2007 A) Message no. 3G103 Diagnosis The employee has been rejected because the balance of the generated posting items

  • FAILED TO FIND METHOD FOR HASH ...

    here is the trace of the pb... I hope that someone can help me. java.lang.IllegalStateException: Failed to find method for hash:5806955373774276652      at org.jboss.invocation.MarshalledInvocation.getMethod(MarshalledInvocation.java:367)      at org

  • Why is ITunes 11 not recognizing mobile devices?

    I recently performed a normal software update which consisted of the ITunes 11, the current version of ITunes.  Everything appears to be working properly, with the exception of managing mobile devices.  When plugged in, no prompts, windows, displays,