It_GroupLookup 

Use

Gets a list of groups that are defined for a specific R/3 system.

This is the list you would get when using the SAP logon dialog, choosing the Groups button, selecting a system from the list and then choosing List.

Syntax

HANDLE DLEX It_GroupLookup (const char *id, const char *ms,
const char *router, Char **groups, int *groupCnt);

Parameters

id

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

ms

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.

router

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.

groups

List of groups available for given server ID

groupCnt

Number of groups found

Return Value

Returns TRUE if successful, otherwise returns FALSE.

See Also

It_NewGroupConnection

Example

The following code prints the list of groups:

// Where

// id = SAP SystemID ,

// ms = Hostname of the message server,

// router = Destination router used to connect to the Message Server

// groupCnt = Number of groups found.

// groups = List of groups available for given server ID

if (It_GroupLookup(id, ms, router, &groups, &groupCnt))

{

int i;

for(i = 0; i < groupCnt; i++)

{

char *str = NEXT_STR(groups, i);

printf("\t%s\n", str);

}

}

else

{

printf("grouplookup: It_grouplookup failed. \n");

}

 

The following code returns the third group in the list of groups:

// hndl = Connection handle

hndl = It_NewGroupConnection(id, ms, router, NEXT_STR(groups, 2), SAPGUI_FRONT);