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
Related Q&A from Austin Sincock
Explaining the difference between BAPIs and RFCs, how to find BAPIs in SAP and how to determine errors made from BAPI/RFC calls Continue Reading
Is there a way to view a list of SAP interfaces such as RFC, BAPI and ALE? Continue Reading
Retrieving a list of parameters for a specific remote function module using JCo connector. Continue Reading