Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling RFC from Java

Former Member
0 Kudos

Hi,

SAP RFC needs to be called from Java code. Are there some specific pre-requisites (SAP version or ant such) for this?

What parameters (like Login ID, password etc...) I need to pass to Java Team?

Regards,

Pankaj

7 REPLIES 7

Former Member
0 Kudos

Hi,

Do I need to use create a BAPI instead of RFC?

Regards,

Pankaj.

0 Kudos

Hi,

BAPI is a RFC function module. But all RFCs are not BAPIs. You need to code in JAVA for providing the login credentials and call the RFC. Apart from that, it is SAP person who will look into other details of the RFC FM.

Thanks,

Vinod.

0 Kudos

Hi Vinod,

Apart from login data, is there any other detail which should be known to Java team?

Also are there any pre-requisited for SAP R/3 RFC call from Java, here SAP R/3 version is 4.6C?

Regards,

Pankaj.

0 Kudos

Hi,

Definitely JAVA team should know the RFC FM signature i.e. Structure of the parameters(like number of fields, data type, length, case sensitivity etc), which are mandatory, optional parameters etc.

BASIS team can help you in setting up the RFC connection.

Thanks,

Vinod.

Former Member
0 Kudos

Hi,

Any Remote enabled Function Module can be called from Java. You need to use SAP Java Connector (SAP JCo) to execute calls to these RFCs from java.

Have a look at http://help.sap.com/saphelp_NW04/helpdata/en/35/42e13d82fcfb34e10000000a114084/frameset.htm. It talks about SAP JCo. Have a look at the SAP JCo Client programming section specifically.

You will need to use the JCO.createClient() method to send the login information to the SAP server. You will need to specify the SAP user name, password, SAP Client number, application server hostname and system number.

Thanks,

Wenonah

Former Member
0 Kudos

Hi,

Any Remote enabled Function Module can be called from Java. You need to use SAP Java Connector (SAP JCo) to execute calls to these RFCs from java.

Have a look at http://help.sap.com/saphelp_NW04/helpdata/en/35/42e13d82fcfb34e10000000a114084/frameset.htm. It talks about SAP JCo. Have a look at the SAP JCo Client programming section specifically.

You will need to use the JCO.createClient() method to send the login information to the SAP server. You will need to specify the SAP user name, password, SAP Client number, application server hostname and system number.

Thanks,

Wenonah

0 Kudos

Thanks!