cancel
Showing results for 
Search instead for 
Did you mean: 

How to realize componentization with DCs?

Former Member
0 Kudos

Hi all,

For days I looked on the solution of this common senario of Componentization.

That is, in NWDI, in one SC, how to use another DC's component in consumer DC, most of the materials refer to use components in the same DC, and with my own try can not get right result.

My step is,

In the producer DC, put the Component to Public Part, with which the Component Controller Interface has been implmented.

In consumer DC, add Used DC (inactive) to DC Metadata->DC Definition->Used DCs.

Now is the problem, I think now I can find the external DC's component in the Diagram of the consumer component ( Choose 'Embed an existed component' to 'Used WebDynpro Components), but I can not find the external component.

This is my problem.

Please give me a hint.

Thanks,

William

Accepted Solutions (1)

Accepted Solutions (1)

former_member186016
Active Contributor
0 Kudos

Refer to these links for links for working with web dynpro dc's:

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/28113de9-0601-0010-71a3-c8780... [original link is broken]

As for your problem stated: The used component will be be visible in component usages node. You cann't see details of component in place where you have embeded it.

For using the component controller, don't forget to add the controller in used controller for the controller where you want to use it.

Regards,

Ashwani Kr Sharma

Former Member
0 Kudos

Hi Ashwani,

Thank you for your quick reply.

The url you gave is what I already read, no step-by-step tutorial for my senario.

And in producer DC, I just select 'Add to Public Part' of the context menu of a Component, I have already added public methods into the Interface Controller of the component.

This is all I did for producer DC.

your words: "to add the controller in used controller for the controller where you want to use it." will popup a dialog to choose the external component, but in this dialog I can not find the external component, this is the exact problem.

former_member186016
Active Contributor
0 Kudos

In your producer dc. You have done correct steps:

- Creating method in the component interface controller

Now you should add the component to the public part (as done by you)

After this you need to create dependecy from consumer dc to producer dc and add the public parts as used public parts.

After this you need to build the dc. (Must) Hope you have done this.

Now, go the component controller of consumer dc. Add controller for component controller of producer dc. Are you able to the last step mentioned ?

Regards,

Ashwani Kr Sharma

Former Member
0 Kudos

You said "After this you need to create dependecy from consumer dc to producer dc", I'm sure I didn't do this before. I wonder where can I add

I explore in the Properties of this DC I can find 'WebDynpro References', then 5 tabpanes there, shall I add the identity of the producer to 'Interface references' tab?

I did this, I build all relevant DCs, but unforturnately I can not find the expected result.

former_member186016
Active Contributor
0 Kudos

For "you need to create dependecy from consumer dc to producer dc"

Go to DTR perpective. Navigate to the producer dc in there. In the component properties view you will see the prorties. Go to dependecies tab. Add the dependency there.

Regards,

Ashwani Kr Sharma

former_member186016
Active Contributor
0 Kudos

Follow this link:

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c0b53558-6df6-2910-cfbf-a63316bb...

It is exactly what you want.

Regards,

Ashwani Kr Sharma

Former Member
0 Kudos

Hi Ashwani,

Finnally I have got the result, no more dependency add, just follow

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/800b7206-9c6d-2910-f78e-ce403471...

I wonder from the very beginning I did this once again, maybe the key step is the build after add public part.

Anyway, thank you for your hint.

William

Answers (1)

Answers (1)

Former Member
0 Kudos

--

Message was edited by:

Bharathwaj