Connects to an SAP Application server R3 using the Group information.

Using Groups takes advantage of load balancing: when using It_newGroupConnection, the application server that is actually used is determined when you log on. Therefore, the It_NewGroupConnection function provides a more dynamic way of connecting to the SAP System than the It_NewServerConnection, because it finds the most suitable application server for you to log onto.

This should be the preferred way to access an SAP System.


HANDLE DLEX It_NewGroupConnection (const char *id, const char *ms,
const char *router, Const char *group, long flags);



SAP System ID that identifies the SAP System. The list of SAP Systems is retrieved from the file SAPMSG.INI.


Hostname of the message server. This message server will provide a list of the currently available application servers that are running on the selected system. Each SAP System provides one Message Server. This information is stored in the file SAPMSG.INI.


Destination router used to connect to the message server as well as to the listed application servers. The list of available SAP routers is retrieved from the file SAPROUTE.INI.


A group from a list of defined Groups in the system.

Use the name of the group as it appears in the SAP Logon list. This group is used to logon to an arbitrary application server in this Group.

You can obtain that list of groups by using the It_GroupLookup function.


Flags to control the connection operation.

Flags also allow you to specify how the coordinates of controls on the screen are expressed (affects all events associated with the connection).

The same flags are used in all of the connection functions.

Return Value

Returns the handle to an SAP Automation GUI session if successful, otherwise returns FALSE.

See Also

It_Login, It_Logoff, It_NewConnection, It_NewServerConnection