cancel
Showing results for 
Search instead for 
Did you mean: 

Call ABAP from Java

Former Member
0 Kudos

Can any one help me in calling an ABAP program from Java.

The version of SAP with me is 4.7.

Thanks in advance.

Regards ,

Nagaraju Donikena

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

How to do other way round i.e if want to call java program from SE38. At present using version 4.7.

Kindly help.

thanks

ananya

Former Member
0 Kudos

You can use the JavaConnector (JCO) to build a RFC-Server in JAVA. After defining the RFC-Destination in SM59, you can call the Java-program from ABAP easily by

CALL FUNCTION ... DESTINATION ...

There is a sample included to the JavaConnector. See:

http://service.sap.com/connectors

Former Member
0 Kudos

To call ABAP from Java when I tried doing it from sample code given in help I was getting the following error. Can any one help in this regard.

Exception in thread "main" java.lang.ExceptionInInitializerError: JCO.classIniti

alize(): Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC'

JCO.nativeInit(): Could not initialize dynamic link library sapjcorfc [no sapjco

rfc in java.library.path]. java.library.path

at com.sap.mw.jco.JCO.<clinit>(JCO.java:735)

at TestConnect.<init>(TestConnect.java:8)

at TestConnect.main(TestConnect.java:25)

Former Member
0 Kudos

Hi,

this is a problem that was many times discussed in this forum. As a result, a valuable tutorial was compiled to address the issues. Have a look at this