Connecting to R/3 Application Server 


To use any functionality of the R/3 application server, you must first acquire a connection handle.


  1. Ask for a new connection to R/3, by using the It_NewConnection function.
  2. This establishes a connection to the R/3 application server, returns a connection handle, and starts single SAP session.

    You can optionally specify that the standard SAPGUI is to be displayed. In this case, a SAPGUI and one Front are invoked.

  3. Log onto the SAP system, by using the It_Login function.

See the sample program SAMPLE.C for an example of using these functions.

You can handle up to six sessions in every connection. See the details in the topic Using Multiple Sessions.

You can handle multiple connections by calling the connection functions multiple times. You may use up to 99 connections.


The It_NewConnection returns this connection handle. The It_NewConnection opens a network connection to the application server and based on the flags passed to it, it starts SapGui-FRONT.

GUILib and SapGui-FRONT are connected via standard port number 3200, through which all information is passed back and forth.

A separate thread is created for each connection, in order to read data from the R/3 application server. When SapGui-FRONT is used, a separate thread is used to read SapGui-FRONT.