CRI4J proxy-based applications. The current article does not make the study of the JCO documentation superfluous, but it should help you to get started. It is probably a good idea to look at the Javadoc for the various classes in a separate window while you read this article. We assume that you already know Java and SAP's BAPIs or other RFC-enabled Function Modules (RFMs). Copyright © 2000 ARAsoft GmbH (http://www.arasoft.de). All rights reserved Sample Program Tutorial1 In this tutorial, we want to connect to SAP and call two BAPIs. Import statements Any program using JCO should contain the following import statement. import com.sap.mw.jco.*; Otherwise, you have to fully qualify each class and interface which is very inconvenient. Connecting to SAP All tutorials other than Tutorial4 use direct connections to SAP. If you are interested in session pooling, please refer to Tutorial4. JCO.Client mConnection; A connection (or session) with SAP is handled by class JCO.Client. try { mConnection = JCO.createClient("400", // SAP client "c3026902", // userid "********", // password "EN", // language "iwdf5020", // host name "00"); // system number mConnection.connect(); } catch (Exception ex) { ex.printStackTrace(); System.exit(1); } A Client object is created via a call to createClient(). You can...
Website: osdir.com | Filesize: 37kb
No of Page(s): 12
Download Thomas G. Schuessler, ARAsoft GmbH: "SAP Java Connector" Tutorial.pdf
No comments:
Post a Comment