cancel
Showing results for 
Search instead for 
Did you mean: 

How to use "Used DCs"?

former_member186148
Active Participant
0 Kudos

Hello SDN!

I've created a WD application in one local DC and some java classes for this app in another local DC. How I can make these classes visible in my WD app?

I'm working with NW2004s.

Regards, Lev.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

if both DC's are under same project then you can go to used webdynpro components and add the component whose methods you want to use.

In your case i suppose Component Interface Definition will be more useful. Following is the link to tutorial of same

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0409d83-5ed5-2910-ef91-e41da6d5...

former_member186148
Active Participant
0 Kudos

Hi!

Thank you for quick answer. I'm working on with local DCs. As I know every DC represents project itself so it's impossible to have few DCs in one project.

Tutorial is useful for me but not in this case since I have two DCs - WD DC (main) and Java DC (with some classes needed for WD DC). I suppose that I must setup DC public parts for Java DC and add these public parts in WD DC. But I can't understand how to create this public parts: which kind of public part (assembly or compile) I must use and what I should add - source or classes and why...

Regards, Lev

Answers (1)

Answers (1)

chander_kararia4
Contributor
0 Kudos

Hi Lev,

Select all your java classes, right click & Export. Select Jar from the list. Now provide a name for the jar file created by you.

After that, Copy the jar file to the Lib folder of your webdynpro project. Right click on it, & create the compile & assembly public parts for the reference to the project. Build the DC.

Now, go to DC perspective, Add the public parts as the Used DCs to the webdynpro project DC. Build the DC.

Its done.

Regards

Chander Kararia

former_member186148
Active Participant
0 Kudos

I've found a solution for me.

Initial conditions:

DC1 is a WD Java DC which need to use java classes from DC2

DC2 - simple java DC (not EJB)

Solution:

1) create two public parts in DC2 - one of kind "compile", another of kind "assembly". For each public part select Entity type "Java package tree" and mark both checkbox ("as Class" and "as Source")

2) add both public parts as Used DCs for DC1 with dependency type "Build time".

That's all. May be some of this is redundant but it works

Regards, Lev

Former Member
0 Kudos

Hi,

I believe an anternative would be work with projects that are not Web Dynpro type but Development Component of type Web Dynpro. Same for the Java project: use Development Component project of type J2EE.

Then you will have the DC Metadata where you can use other components public parts.

Regards, Roelof