Skip to Content
avatar image
Former Member

Moving between 2 applications in same DC

Hi

There is a DC which has 2 applications in it. A link is provided on first application, on whose onAction method, the iview in the second application is called and displayed. In the second application, there is a table displayed with some data coming from R/3. On clicking any of the data, the corresponding value is picked and sent back to the first application and displayed there.

For thsi , i created an exit plug in the first application's component's interfaceView and wrote the following code in its view:

try{

String deployableObjectName =wdComponentAPI.getDeployableObjectPart().getDeployableObjectName();

Map urlParameters = new HashMap();

WDDeployableObjectPart deployableObjectPart = WDDeployableObject.getDeployableObjectPart( deployableObjectName, "CustomerBACodeSelectionApp", WDDeployableObjectPartType.APPLICATION);

String urlToTargetApp =WDURLGenerator.getApplicationURL(deployableObjectPart);

wdThis.wdGetCustomerBACodeDisplayCompWindowInterfaceViewController().wdFirePlugBACodeDisplayAppExitPlug(urlToTargetApp);

}catch (WDURLException e) {

e.printStackTrace();

}catch (WDDeploymentException ex) {

ex.printStackTrace();

}

It works and the second application is called.

But in the second application when i write similar code, it doesn't work, it doesn't go back tot he first application. (Even when i tried simply without having to transmit the data ).

Can anybody please suggest something in this regard?

Thanks & regards,

Anupreet

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • avatar image
    Former Member
    Dec 07, 2005 at 07:50 AM

    Hi Anupreet,

    U have to use an interface controller to transmit data from one appln to another appln.

    Since u have passed on to the the second view u have to pass the value frm 2 to the 1 view so u should use event handling for this.

    Hope this helps u,

    Regards,

    Nagarajan.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 07, 2005 at 07:55 AM

    Hi,

    To know more abt event handling check on to this link.

    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/tutorial on using validating and non-validating actions - 33.htm

    This would help u,

    Regards,

    Nagarajan.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 07, 2005 at 08:16 AM

    hi,

    we can communicate through 2 WD DC`s with Events and Methods defined in Interface controller and Plugs in Interface Views. You should create public part and add appropriate Web Dynpro Component. Then you have to add public part as used DC`s public part, add component to Used Web Dynpro Components.

    The steps are:

    1) create WD DC "utils"

    2) create WD Component "Component1"

    3) In interface controller define method or event or context strucure

    4) Right click on "Component1", select "Add to Public Part". Specify name (Utils). Build DC.

    5) create WD DC "component"

    6) In Used DCs of "component" add public part "Utils" from component "utils"

    7) create WD Component "Component2"

    8) Add used Component for "Component2". Click "browse..." and select Component1, specify name (Comp1UC).

    9) Open view from Comopnent2 and add Comp1UC (Web Dynpro Component Interface Controller) as Required Controllers.

    Now you can call methods:

    wdThis.wdGetComp1UCInterface().method();

    make sure that you have built your project with public part successfully and there is a jar file under "_comp\gen\default\public\<Public part name>\lib\java\" folder.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 07, 2005 at 08:21 AM

    Hi,

    To go back to the first application do inter application navigation by using exit plug.

    for more idea check this link

    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/tutorial on inter-application-navigation - 15.htm

    Regards,

    Vijayakhanna Raman

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 07, 2005 at 09:01 AM

    hi anupreet.

    if ur two applications are in same project(od DC) u can easily navigate and pass data between them.

    first i tell wht i understood.

    u want to call second application on some action, then in second application u will select some data and clicks, then u wqant to send this data to first application. am i correct.

    STEPS:

    go to <b>used webdynpro components</b> in first and add used component fron second component.(and first in second)

    go to windows and open open navigation modeller.

    add interface view of second component in first component.(and first in second)

    in first window, create an outbound plug to the view from which u want to navigate to second application.

    and link to the default plug of the second interface view.

    in event handler from which u want to go to second application fire this plug.

    TO COME FROM SECOND APP TO FIRST.

    first add the parameters(values which u want to pass from second) to the default plug of the first interface view, in onfiredefaultplug u will get the values which sent from the sec application. u can set these values in controller context.

    in second applications window, add plug to the view from which u want to come to the first app and add the parameters which u want to send.

    on some action fire this plug by passing appropriate values, use same names of the parameters in outbound plug of second applications view and first applications interface view .(and the number of parameters must be same.)

    if it solves ur problem let me know.

    regards.

    Brahmanandam Auslai

    Add comment
    10|10000 characters needed characters exceeded