How can we call methods of one web dynpro component in another one

Hello Team,
How do I call  one Web Dynpro component methods in another Web Dynpro component.
How do we use public parts.
thanks

Hi,
You want to use Comp2's getData() method in Comp1
If both the WebDynpro components are in the same DC:
1. Create a wrapper method (with the same signature) in the Comp2's Interface controller. And invoke the Component contorller's getData() method in this method using the below code.
wdThis.wdGetComp2Controller.getData()
2. Now Go to the Comp1 and right click on UsedWebDynproComps and add this Comp2 as a UsedWebDypro component.
3. Now go to the Component Controller of Comp1 and in properties tab add the usage declaration of Interface controller of Comp2.
4. Now using this below code you can access the method of InterfaceController of Comp2.
wdThis.wdGetComp2Interface().getData();
If both the WebDynpro components are in different DCs:
1. Right click on Comp2 and select Add to public part on Comp2 in DC2.
2. Now Add this public part in DC1 UsedDCs.
Now repeat the above stpes 1...to..4. of  "If both the WebDynpro components are in the same DC" same.
Regards,
Charan

Similar Messages

  • Parameter transfer from one Web Dynpro Application to another

    hi,
    Is it true that  only parameters with string type can be transfered from one Web dynpro application to another ?

    hi, Justin ,
    You are right , I can use inplug for the dest component , and can transfer referenced type , but now I met a problem , how I can transfer the parameter to the dest comp ? 
    I can use the following code to transfer a value from origin to dest , but how to transfer an object , can you give me some sample code ?
    CONCATENATE l_url '?'
                   '&guid=' lv_guid
                   into l_url.
    CALL METHOD window_manager->create_external_window
          EXPORTING
            url    = l_url
          RECEIVING
            window = lo_window.

  • Navigating from one Web Dynpro app to another not belonging to same project

    Hi All,
    I wanted to know is it possible to navigate from one Web Dynpro app to another which does not belong to the same project. if yes how.
    Regards
    Sid

    Hi Siddarth,
    If you want provide the interaction between two Web Dynpro applications then you must develop those projects as Development Components as DCs provides the reusability of the components created.
    You can  through these link to find out more information:
    Where to start DC creation  ?
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/bd0e0401-0801-0010-aaab-d0e1742da383">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/bd0e0401-0801-0010-aaab-d0e1742da383</a>
    Server Side Eventing:
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/19e6e990-0201-0010-eca6-a62e342eaad3">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/19e6e990-0201-0010-eca6-a62e342eaad3</a>
    Regards,
    Jhansi

  • How can I write java code in web dynpro to show KM content document?

    Dear all developer
    SDN developer who have any easy example java code for get and show KM content documents(documents/com.xx.km/.). We are develop this project by Netweaver Studio 7.0 and using WEB Dynpro application.
    Thank for all comment and advice.
    Jumnong Boonma

    Hi
    i dont have the exact code but yes..i can refer to the link for Web Dynpro applications for the Portal.
    [http://help.sap.com/erp2005_ehp_03/helpdata/EN/42/fa080514793ee6e10000000a1553f7/frameset.htm]
    Here look out for Absolute Navigation.
    Hope it helps...
    Thanks..

  • How can you add iview personalization to web dynpro iviews like URL iviews?

    In the URL iview editor you can define URL paramaters which are available for personalization by the user from the iview's "Personalize" option. 
    Can this also be done using web dynpro for java iviews? 
    Thanks for your help.
    Jeff

    Hi Jeff,
    You do have a personalization that can be defined from the user, for java webdympro iview. But is not the same as you have for URL iviews.
    Have a look on the links bellow:
    http://help.sap.com/saphelp_nw70/helpdata/en/42/ed3ce7f8593eebe10000000a1553f7/content.htm
    http://www.octavia.de/fileadmin/octavia_files/content_bilder/Hauptnavigation/SAP_NetWeaver/WebDynpro/Tutorial_1.pdf
    Please remember to evaluate the replays, this incentive the SDN to keep growing,
    regards,
    Fabio

  • How can i call method defined in the binding page from popup

    I couldn't call method defined in pageDef from dialog exist in popup
    while i can call it from button or link
    how can I do that

    Hi,
    my answer to this is : yes, this can be done. So next is that you explain what you've tried so we can share our view with you
    Frank

  • Calling one Web-Dynpro program into Another

    Hi All,
    I'm currently working on a Web-Dynpro program in which I am display 3 tabs(Using TabStrip) and in each tab I have a ViewContainer.  
    I want to be able to execute other Web-Dynpro programs within the Viewcontainers of the Tabs. 
    If the End-User goes from tab to tab, I want to pass a select number of parameters between tabs.   
    Is this possible to do and if so, how can I set this up?
    Thanking you in advance.

    Hello Lisa,
    I'm not sure what you really want...
    If you want to share data between several views of one webdynpro component, you should use the [context|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/48/444941db42f423e10000000a155106/frameset.htm] of your [component controller|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/e2/434941db42f423e10000000a155106/frameset.htm].
    If you mean by "execute other Web-Dynpro programs within the Viewcontainers" to embed another webdynpro component you should have a look at [Cross-Component Programming|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/a7/1d8b412bb5b35fe10000000a1550b0/frameset.htm].
    Regards,
    Alej

  • How can I give a name to excel sheet and open another one?

    Hello!
    I use CSVWriter for writing in excel file.
    I have 2 questions:
    1.     How can I give a name to a Sheet in excel file?
    2.     How can I save the first Sheet and open another one with a different name?
    Thanks!

    This is the equivalent in Apache POI which may or may not help. I've never used CSVWriter.
    HSSFSheet sheet1 = workbook.createSheet("sheet1Name");
    HSSFSheet sheet2 = workbook.createSheet("sheet2Name");Then you can use either sheet object to write your contents. Look at the documentation for CSVWriter that pertains to sheets as it should tell you how.

  • How can I use EPCM.loadClientData in Web Dynpro???

    Hello colleagues,
    I've created Web Dynpor application and want it to be iView receiveing aparameters from another (not mine) iView on the page. Another iView generates event and store data to EPCF client data bag. In my Web Dynpro app I arranged handling the event but can not get data from client data bag
    Could you help me to find a workaround?
    Thanks and best regards,
    Konstantin.

    Hi,
    The EPCF client data bag API provides methods to store data in a transient data buffer on the client.
    EPCM.storeClientData(nameSpace, name, value)
    This method saves data in value under a key. The key is generated by combining the parameters nameSpace and name. If the key already exists, the stored data will be overwritten.
    For further ref check on to this link.This should help u better.
    http://help.sap.com/saphelp_erp2005/helpdata/en/68/322a9261c54e51b7965f86aac3dae2/frameset.htm
    Hope this helps u,
    Regards,
    Nagarajan.

  • How can I move a Pages file from a folder to another one?

    I Have done the upgrade to mac os Yosemite but now i'm Not able to move a file from a folder to another one Inside iCloud
    now it's impossible to organize MY archive

    Thankyou Winston, you guess right. What i don't understand is why with the older version of mac os (10.9) i can organize my document into icloud folders using the Pages app window. But now with the new version i'm no longer able to do that. Using ipad in the same window there is no problem, but in mac os it doesn't work. 

  • How to use one Web Dynpro DC into another Web Dynpro Dc

    Hi All,
    I am trying to learn the usage of DC but I am unable to find a basic tutorial on this topic. I found a few tutorial and few blogs too, but none of them explains topics like:
    How to call child component methods from parent component and vice versa too if possible?
    Can somebody please provide me with a basic tutorial on this topic.
    Regards
    Sid

    Hi,
    Go through the Componentization tutorials
    https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/webcontent/uuid/bd0e0401-0801-0010-aaab-d0e1742da383 [original link is broken]
    https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/webcontent/uuid/751d003a-0b01-0010-8996-afbaa3fd5339 [original link is broken]
    https://www.sdn.sap.com/irj/sdn/developerareas/webdynpro?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#comp
    Regards,Anilkumar

  • How can I call functions from a SWF loaded in to another SWF?

    Hi there,
    Please excuse my ignorance, I am very new to actionscript and flash.
    I have 2 SWF's - a.swf and b.swf.
    I load b.swf into a.swf with the following code:
    var swfLoader:MovieClipLoader = new MovieClipLoader();
    swfLoader.loadClip("b.swf", container_mc);
    Now in b.swf, I have a function as follows:
    public function sendData(){
      trace("I ran the function!");
    So I have done a lot of reading, from what I can tell I should be able to run the sendData() function from the code in a.swf, by typing:
    container_mc.sendData();
    but its not working. What am I doing wrong?
    Thanks in advance,
    Adam

    Thanks heaps mate, after a bit of trial and error it works! Here is the code that I added:
    var loadingListener:Object = new Object();
    swfLoader.addListener(loadingListener);
    loadingListener.onLoadStart = function(container:MovieClip):Void  {
        trace("The MovieClip "+container+" started loading");
    loadingListener.onLoadInit = function(container:MovieClip):Void
        trace("The MovieClip " + container + " has been initialized");
      container_mc.test();
    Marked your answer as correct :-)
    Thanks again, I really appreciate your help.
    Cheers
    Adam

  • Calling session bean's business method through web dynpro component

    Hi All,
    Can anybody tell me how to call a session bean's methods through a web dynpro WITHOUT java-model or web service model ??
    I have following scenario:-
    1. Stateless Session bean having two business methods
    2. Web Dynpro component
    3.Now i want to call business methods without using any model. I have got following piece of code but I dont know how to go about it.
    4.Where do i have to set JNDI name for session bean? which interface will be looked for?
    5. Do I have to declare public part for EJB DC? If yes, how?
    //This is inside web dynpro component
    InitialContext   context = new InitialContext();
    o = context.lookup(JNDIName);
    TestSessionbeanHome homeRef = (TestSessionbeanHome) PortableRemoteObject.narrow( o,                                                                               
    TestSessionbeanHome.class);
    TestSessionbean beanRef = homeRef.create();
    <returnValue> = beanRef.<ejb method name>
    Please help to get a step-by-step approach to this case.
    Thanks and regards,
    Amey Mogare

    Hi,
    If  I comment out the part that is using session bean's business method, DC is building fine.
    And if I uncomment, then compiler is unabl eto resolve business method(s).
    And i would like to mention that my EJB + J2EE App DC is building properly, but it havent yet deployed properly as I am waiting for data-source-alias name prefix to be configured by ERP team. So will this be a reason why Web Dynpro DC is not able to resolve business methods ??
    Because Web Dynpro DC is able to resolved all interfaces of Session bean and entity bean. But when it comes to business method, its not able to resolve.
    Any more ideas why it is not happening?
    Pls help.
    Now i went through some forum posts regarding this and found that we also need to add EJB DC to Java Build Path for WebDynproDC>Properties>Java Build Path.
    I did this and now it is able to resolve business methods and DTOs as well. So to summarize I did following:-
    1. Added EJB DC (complete DC) as a Used DC to Web Dynpro DC with Buid-n-Deploy-n-Run time dependency
    2. Added Sharing reference of J2EE application DC to Web Dynpro DC -->Properties
    This reference I constructed as follows:-
    <vendorname>/<name of j2ee application as appearing under display name tag in application.xml (replacing '/' with '~')>
    So my Sharing Reference becomes:- <vendorname>/reqpstapscreqpstapja_reqid
    3. Added EJB DC to Java Build Path in Web Dynpro DC's properties
    4. Then I added following piece of code to get object of SessionBean class
    InitialContext context = new InitialContext();
    Object o = context.lookup("java:comp/env/ejb/SessionRequestIDBean");
    SessionRequestIDHome homeRef = (SessionRequestIDHome) PortableRemoteObject.narrow(o, SessionRequestIDHome.class);
    SessionRequestID beanRef = homeRef.create();
    beanRef.<business method>
    But After doing this I am facing another problem :-
    The build fails saying it is not able find the package for DTOs. But when I see the Component Controller's code it is not showing any red or yellow marks.
    Can anybody pls help me out here?
    Thanks and regards,
    Amey Mogare

  • How can we call the method of used controller?

    Hi All,
       i created two WDA Applications.( like YWDA1,YWDA2 ) . i am using the component WDA2 in WDA 1.and displaying the one view of WDA2 as popup window in WDA1 on action of one of the input element in the view of WDA1 by using the method l_window_manager->create_window_for_cmp_usage
    I have a button on the view of WDA2 which has appear in the popup window...how can i call the method which has binded to that button....and where should i code that...and i need to assign selected value in the popup window to input elemetn of view  WDA1
    Please help me to resolve this....
    Regards,
    Ravi

    You can not directly call view's event handler from other component.
    create a method in component controller of the second component and in the button click call the component controller method. ( also make the method as interface so that you can call it from other components )
    Now, you can call the interfacecontroller's method
    DATA: l_ref_INTERFACECONTROLLER TYPE REF TO ZIWCI__VSTX_REBATE_REQ_WD .
      l_ref_INTERFACECONTROLLER =   wd_This->wd_CpIfc_<comp usage name>( ).
      l_ref_INTERFACECONTROLLER->Save_Rr(
        STATUS = '01'                       " Zvstxrrstatus
    save_rr is the method of second component controller

  • How can I call a web service using JAVAscript in LCD

    hi guys,
         I know it can call a WSDL in LCD, but I have not any WSDL web service , and I have a REST web service ,how can I call this REST web service in LCD? I checked some documents and found nothing...if it's possible that it can call a REST web service using JAVAScript code, I mean I can program some code to call this web service ?
    thanks,
    Jesse

    Hi Jesse,
    You can do GET, PUT and POST using FormCalc, so you should be able to access a REST web service. 
    There is a example of accessing a RSS feed in this thread, http://forums.adobe.com/message/5695433#5695433
    Regards
    Bruce

Maybe you are looking for

  • Mid Month Close - Financial Close

    Hello I would like to ask the experts on the activities we need to perform for a mid-month close during a fiscal year (A month which is not a normal fiscal month end) . For example, if a company is being sold in the middle of the month and they need

  • Changing the Custom Properties of Custom Webpart in Sharepoint 2013.

    Am working on a requirement , where i need to create a quick poll , for that i am using some Third party webpart, http://www.amrein.com/apps/page.asp?Q=5755    , this is the link of that Polling webpart , where the source code is not available. Quest

  • Is this normal storage behavior?

    I knew I'd need to transfer some files off-drive soon but the space I knew I had was suddenly evaporated and I was faced with the "Disk Full" error. As fast as I could delete documents the space freed was being used up even though all apps that could

  • Clone Stamp Black Smudge

    I'm not good with Photoshop.  In fact, the clone stamp has always been one of my favorite tools.  But, I just bought Elements 12 and I find that my clone stamp is doing something strange.  In the circle, when I move it around the photo being edited,

  • Onchange on a select that replaces the innerHTML of a encapsulating div crashes the browser

    webos browser under 1.3.5.1 crashes description: If a div includes a select and the select has an onchange which causes the innerHTML of the div to change, the browser crashes and reloads. You can see the below html at: http://quigleyjones.com/drop