cancel
Showing results for 
Search instead for 
Did you mean: 

How to make a RFC call to SAP from JAVA

Former Member
0 Kudos

Hello everyone,

I want to know the basic idea on how to make a RFC call to SAP from JAVA.

What are the pre-requisites for it ? What are the tools (JAVA tools , DLL files etc ) required before I can make a RFC call? Basically I am asking for a high level design with basic technical pre-requisites.

Thanks-

Harmeet.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Following file describes all the steps you need to know about how to call SAP using RFC in Java.

https://websmp104.sap-ag.de/~sapidb/011000358700000730362009D/SAPJCo_Doku_3.0_EN.pdf

Former Member
0 Kudos

Hi Harmeet,

as pointed out by the previous poster, for RFC calls from Java there's only one choice, the [SAP Java Connector (JCo)|https://service.sap.com/connectors|You need a user ID for the service market place to access this link]. Usage is pretty much straight forward, just download it and check the examples that come with it. You have the choice between 2.x version and 3.x version. For a fresh start I'd recommend to use the 3.x version as it has several improvements over the previous versions (cleaner API, less marshalling and thus improved memory handling, etc.).

If you're not limited to RFC and are accessing a SAP WAS (6.x or higher) you could also define web services for the RFC function modules in SAP and then simply call the web services from Java (using axis or whatever your preferred library/framework is).

Cheers, harald

Former Member
0 Kudos

Hi ,

I had already downloaded the SAP JCO v 3 . But I have some confusions on how to proceed. Thats is why I have posted this thread.

Former Member
0 Kudos

Start with the examples included with the JCo3 distribution, e.g. StepByStepClient.java is a good start. Change the connection settings, compile it and run it. Then you either have a working example or some more concrete questions...

Former Member
0 Kudos

Thats a great suggestion ! Thanks .. Any suggestions on which JAVA complier should I use to run the stepbystepjava ?

I have ECLIPSE already installed on my system.

Former Member
0 Kudos

Assuming that you have some Java flavor of Eclipse, you can utilize the builtin Eclipse Java compiler, which works fine. When you create a project, don't forget to add the sapjco3.jar as an external library to the build path of your Eclipse project.

Former Member
0 Kudos

Hi,

have you already tried searching for it on SDN? You are not the first person to ask about this, and neither am I the first to complain about people asking without searching.

Search, and you will find it. Here a few hints to help you with the search - JCo, [connectors|http://service.sap.com/connectors] - if you have an S-User ID.

T00th.