How do I run ABAP programs through a Java-based interface?

How do I run ABAP programs through a Java-based interface?

I have to develop a Web-based application using IBM Websphere Application Server that accesses SAP using J2C connectors. My problem is that I need to run ABAP programs that access (update/insert/delete) custom "Z tables" in SAP. How can I run ABAP programs from VisualAge for Java (using Websphere J2C connector for SAP)?


    Requires Free Membership to View

    When you register, you will start receiving targeted emails from my award-winning team of editorial writers. Our goal is to keep you informed on the hottest topics and biggest challenges faced by SAP professionals today.

    Hannah Smalltree, Editorial Director

    By submitting your registration information to SearchSAP.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchSAP.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

The best way to run ABAP programs through a Java-based interface is to RFC-enable them. By creating an RFC wrapper around your ABAP programs, you allow the R/3 application server to effectively manage any communication from the outside world. If you have already written the application in ABAP, then you simply need to go into the Function Builder (SE37), create a new RFC with the requisite parameters, insert your ABAP program, and check the 'RFC Enable' box under Administration.

If you are doing simple table lookups, you may want to build your application logic in Java (e.g. when and what data is retrieved) and use RFCs such as RFC_READ_TABLE to connect to R/3. This allows you to maintain your application outside of SAP and means that you can leverage some of the more advanced features of Enterprise Java (messaging, EJBs, etc.).


This was first published in April 2002