Show TOC

Procedure documentationDirect Connections Locate this document in the navigation structure


The following section describes an example program for creating a direct connection. For the complete program, see Example Program Connect1.


  1. For establishing direct connections, you need the following classes:

    • JCO:This is the main class of the SAPJCo. It contains many useful static methods.

    • JCO.Client: This class represents a connection to the SAP server.

    • JCO.Attributes: These classes contain the attributes of a connection, for example, the release of the SAP system.

  2. In addition, each program that the SAP JCo uses contains the import statement displayed below. If this was not the case, you would have to qualify all the JCo classes and interfaces individually.

  3. You then define a connection variable for contacting a specified client of the SAP system.

Syntax Syntax





Import Statements


Defining Connection Variables

JCO.Client mConnection;

End of the code.

More Information

For information on further procedures, see:

The complete example program for establishing a direct connection: