Problem solve Get help with specific problems with your technologies, process and projects.

Examples of Java making RFC calls

Expert Austin Sincock suggests an example that demonstrates how to call a BAPI through Java.

I'm a novice when it comes to Java, but I'm keen to learn more about the language. Do you have any examples of...

a Java program that makes an RFC call to SAP to get some data? Ideally, an example that makes a call to a BAPI to get some data and a example that gets data directly from a table (if possible). Could you also specify in the example what additional Java components would be required from the SAP Java SDK that comes with the SAPGUI or elsewhere. Thanks in advance for your reply.

If you are interested in running a simple example of how to call a BAPI check out my tip "Build a Java Web application for SAP right now". This shows a basic mechanism to call SAP using JCo through a standard Java Server Page (JSP). The advantage of using JSPs for testing is that you only need to reload the Web page from the Java application server to check out your changes. Check out the article for more information on JSPs and Java application servers. I also include a working example to get your development effort kickstarted.

Dig Deeper on SAP Java and J2EE