cancel
Showing results for 
Search instead for 
Did you mean: 

JCo Outbound( calling Java Function from ABAP )

Former Member
0 Kudos

HI,

I want to call a JAVA function from ABAP.I have installed the JCo toolkit and included the sapjco.jar file in the classpath of my system.

When i execute the program(Example5.java,provided with sapjco.zip) from the command prompt,it is working fine,the server listens to the calls made from ABAP via RFC destination.

But if i copy the same program in NWDS in a JAVA project,to run it from there as JAVA application,after including the sapjco.jar file in the project JAVA build path,i get the following error,marked by a red cross ,at the head of the program,even before i run it.

<b>This compilation unit indirectly references the missing type com.sap.jdsr.writer.DsrIPassport (typically some required class file is referencing a type outside the classpath)</b>

What changes do i need to make,to run it from NWDS?

I tried to include the sapjcorfc.dll file along with the sapjco.jar in the java build path,but it doesn't help.

Please tell how to solve this issue?

Regards,

Siddhartha

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hello sid,

which jco version are you using?

are you using the same jco lib when running in command

line and in nwds?

if you are, try checking the order of the your classpath.

your jco lib (which you are using in command line) should

come first in order prior to the default libraries in your project.

regards

jo

Former Member
0 Kudos

hi Jo,

Thanks a lot.I replaced the default sapjco.jar with the one i downloaded from service marketplace and it is working fine now.

Thanks.

Regards,

Siddhartha

Answers (0)