cancel
Showing results for 
Search instead for 
Did you mean: 

how to Communicate between 2 DCs

konchada_saikrishna
Active Participant
0 Kudos

Hello All,

I am creating two DCs Comp1 & Comp2 both in different applications,

How to use a method in Comp1 into Comp2 and viceversa.

My components are local development, I am not using any DTR such.

Can any one help me in this regard,

Thanks & Regards,

Sai.k.k

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Lets say u want to use method1() of Comp1 in Comp2.

1. The method should be defined in the interface controller of comp1

2. create a public part in comp1

3. Add the public part in comp2 through Used DC node

4. Add the comp1 in Used webdynpro components of Comp2

5. Now u can use all the methods of comp1 in comp2 whichever is availablei in interface controller

6. To use u can write following kinda code

wdThis.wdGet<Comp1>Interface().method1();

Hope above will help u,

Regards

Deepak

Message was edited by:

Deepak Gupta

konchada_saikrishna
Active Participant
0 Kudos

Hi Deepak,

As said by you,

I have created a method in interface controller, but could not see it in data modler.

Regards,

Sai.k.k

abhijeet_mukkawar
Active Contributor
0 Kudos

hi,

if you are done with creation of method in interface controller,

1) go to component COMP2, right cick and say Add to Public part

2) these publicaly created components now should be used in COMP1,

3)Go to the DC Metadata of main DC, in DC Definition, click on Used DC, here mention the public part of COMP1

4)no defien component usage in Used WebDynpro components

and then use its methods

hope it helps

regards

konchada_saikrishna
Active Participant
0 Kudos

Hi Abhijeet,

Thanks for your reply...

Now I could access the method sucessfully, I have a small problem continueing..

1) The scenario is I have 3 DCs Parent, Comp1, Comp2..

2) The Comp1's View, Comp2's View should be in viewset of Parent.

3) When I click a button in Comp1's view, it should replace the Entire Viewset

4) and Parent Component, how to call comp1 or comp2 as default dynamically ...

If we use n number of DCs, one DC with one application, is it efficient or a poor design. Are there problems if access to application in one another

This is going to be very helpful to me ...

Thanks & Regards,

Sai.k.k

abhijeet_mukkawar
Active Contributor
0 Kudos

Hi,

there is no specific guidelines regarding how many DCs to be used, but the thing is we should use them sparingly, we should take care that they does not make the structure messy. When it is necessary then only DC should be creeatd. The objective should be keeping the project structure modularised.

I am bit unclear about your doubt, could you please explain me that in details?

if that points to sharing a view then it's impossible to share a view between 2 components.

let me know the doubt

hope it helps

regards

konchada_saikrishna
Active Participant
0 Kudos

1) My Scenario is I am Having 3DCs ParentDC, Child DC1, Child DC2 and all the three are applications too.., which mean each individually can be run with out having any dependency....

2) Now I want to Integrate these 3 DCs, i.e., in the parent DC, I need to show 2 links 1st for Child DC1, 2nd for Child DC2 in a view set.

3) when user clicks one of the links, the parent DC's view set should be replaced with the Corresponding DC's View set.

if u require I will explain it further

Regards,

Sai.k.k

abhijeet_mukkawar
Active Contributor
0 Kudos

Hi,

what you are saying is about accessing other components views, but that is impossible. You may only re-use complete components and their external interfaces defined via Interface Controller and in turn InterfaceViewController.

For your requirement you need to copy the view explicitly, so that will be like a new view and all of its mapping will be gone then. So it is just like creating new view what you will have is just the context hierarchy and Ui element but wont have mapping. Since WD doesnt allow to share the views.

Ofcourse in view, you can have childs views in one part of view set but creating link between childs viewset and parents view is impossible.

I hope you got the solution, so what you are saying is not possible.

regards

Message was edited by:

Abhijeet

abhijeet_mukkawar
Active Contributor
0 Kudos

have you solved your problem?

regards

Former Member
0 Kudos

sai K.K,

To use & share views among different DC's, you need to do something like as follows,

lets suppose ur ParentDC has view1, & your childDC has view2

<b>I assume u already hav done following:</b>

1) You hav created public part of ChildDC and used in Parent DC,

2) Added the ChildDC in "Used webdynpro components" of ParentDC

Now views of ChildDC are also available in the ParentDC,

<b>To use do following:</b>

Go to the Window of ParentDC

embed View --> choose "Embed Interface View of a Component Instance" --> Next

Now expand the tree and select the view under "<i>ChildDC_Comp</i>" which u want to add,

Now the ChildDC view is available in your parent DC window,

You can create plugs and navigate on some action,

Let me know if u need further scenario specific help,

Regards

Deepak

konchada_saikrishna
Active Participant
0 Kudos

Hi Abhijeet,

Thanks for your help, I got enough Idea to consider and design DCs from you.

This helped my scenario a lot.

one last doubt,

how to call a Viewset form a individual view and viceversa

Thanks a lot,

Regards,

Sai.k.k

konchada_saikrishna
Active Participant
0 Kudos

Not completly, but came to a conclusion ...

Just waiting to know how to call a VIEWset from individual View, and viceversa from you.

regards,

Sai.k.k

konchada_saikrishna
Active Participant
0 Kudos

Hi Deepak,

I tried embedding child dc views in parent dc window, in child dc we r having 2 views but it is not showing any of them.

and

1) consider in parentDC, i have 3 views v1,v2,v3 and one view set.

2) views v2,v3 are in viewset.

3) when i click a button in view v1, it need to call viewset with v2,v3

4) when i click a button in v3 of viewset it need to replace entire viewset with v1.

Regards,

Sai.k.k

Message was edited by:

Konchada Sai Krishna

Former Member
0 Kudos

Sai.k.k,

first of all I should tell you that when I say ChildDC views are avalable in ParentDC that means InterfaceView is available, So you wont be able to see the view names, but the name of the window which contains the views/viewset.

like this <i><window-name>InterfaceView</i>

Now lets come to your problem stated above.

<b>1. How to call viewset from a view & vice versa when both are in the same DC</b>

taking ur example given above:

Your window contains view v1 & viewset containing views v2, v3

create navigation between view v1 and v3, (inboud & outbound plugs)

a) when you are at View v1, fire plug to v3 (v1 will be replaced by viewset containing v2 & v3)

b) when you are on viewset, fire plug to v1 on click of button in v3 [ur viewset will be replaced by v1],

try it.........Hope u will be able to do it now.

<b>2. How to call viewset from a view & vice versa when they are in the different DCs</b>

Suppose:

ParentDC has Window1 containing View v1 and

ChildDC has Window2 containing Viewset with views v2 & v3

Now when u add ChildDC comp in ParentDC used Components,

> Go to Window1

> rt click EmbedView

> choose Embed Interface View of Component Instance"

> Select Window2InterfaceView from Hierarchy

Now open navigation modeler for Window1 and define navigation through plugs.

I have tried best to put things on paper,

Revert if still u find any problem

Regards

Deepak

abhijeet_mukkawar
Active Contributor
0 Kudos

Hi,

It is impossible, view set can have niether Inbound plug nor OutBound plug.

so what you wish is not possible.

<b>for more on Embedding Component:</b>(tutorials)

https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/19e6e990-0201-0010-eca6-a62e342eaad3

https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/751d003a-0b01-0010-8996-afbaa3fd5339

<b>For more on Embedding Views:</b>(tutorials)

https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/1ee0e990-0201-0010-75bf-a087c241cb83

https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/751d003a-0b01-0010-8996-afbaa3fd5339

<i>If you want to navigate from parent to child then after defining its usage you can create link between the two views and then you can navigate from parent view to child view. But the link between view set and view is impossible</i>

<b>I would like to summarize all:

Component Usage : possible , you have done it

Creating link to child view from parent view: possible after you define usage of component.

creating link bet viewset and view : Impossible</b>

hope it helps

regards

reward points if it helps

Answers (4)

Answers (4)

Former Member
0 Kudos

Hai,

See this Link

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/wdjava/usecomponentsinbiggerWebDynproprojects+%28componentization%29&

Regards,

Naga

Former Member
0 Kudos
Former Member
0 Kudos

Hello Sai,

http://help.sap.com/saphelp_nw04/helpdata/en/49/d0ae143e94774a9423ca8c009dc76f/frameset.htm

Take the help of the above link,in that every matter related to DCs and all types of communication processes between DCs are available,from that you can choose the case which is suitable for you.

Reward me with points if this information is helpful to you.

Former Member
0 Kudos

Hi

You can also find the tutorial for this on SDN tutorial page:

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de1...

Refer tutorial number 38 from this.

regards

ambica