SAPGuiUtil Object

Description

A utility object in a SAP GUI for Windows application.

IMPORTANT

Enables you to perform connection operations on your SAP Gui for Windows application during the test run.

Operations

The sections below list the built-in methods and properties that you can use as operations for the SAPGuiUtil object.

Methods

Method AutoLogonConnects and logs on to an SAP server.
Method AutoLogonByIPConnects and logs on to an SAP server according to its IP address.
Method AutoLogonByTargetSystemConnects and logs on to an SAP server according to its target system.
Method CloseConnectionsCloses any SAP connections that were opened by UFT One or by the user.
Method OpenConnectionOpens a connection to the specified SAP server.
Method OpenConnectionByIPOpens a connection to the specified SAP server according to its IP address.
Method OpenConnectionByTargetSystemOpens a connection to the specified SAP server according to its target system.
Method StartBPCATracingBegins running the Business Process Change Analyzer to detect changes in a transaction's objects (as compared to the TBOM).
Method StopBPCATracingStops running the Business Process Change Analyzer.

Back to top

 

AutoLogon Method

Description

Connects and logs on to an SAP server.

Syntax

object.AutoLogon ServerDescription, Client, User, Password, Language

Arguments

ParameterDescription
ServerDescription Required. A String value.
The server to which you want to log on. The string is case-sensitive and must be identical to the one displayed in the SAP Logon dialog box.
Client Required. A String value.
The SAP client you want to use.
User Required. A String value.
The username with which you want to log on to the SAP Server.
Password Required. A String value.
The encrypted value of the password for the specified username.
To find the encrypted value, use the Password Encoder utility (Start > All Programs > Micro Focus > Micro Focus UFT One > Tools > Password Encoder) or use the Data Table encryption option (right-click the unencrypted value in the cell and choose Data > Encrypt). For more information, see the UFT One User Guide.
Language Required. A String value.
The 2-letter code for the language you want to use.

Return Type

None

IMPORTANT

The AutoLogon method opens a new connection even if an open session already exists.

Tip: You can also use the SAP tab of the Record and Run Settings dialog box to instruct UFT One to connect and log on to a specific server and client at the beginning of each record and run session.

Example

Back to top

 

AutoLogonByIP Method

Description

Connects and logs on to an SAP server according to its IP address.

Syntax

object.AutoLogonByIP ConnectionString, Client, User, Password, Language, [SystemNumber], [RoutingServers]

Arguments

ParameterDescription
ConnectionString Required. A String value.
The connection string for the SAP server to which you want to log on.
Client Required. A String value.
The SAP client you want to use.
User Required. A String value.
The username with which you want to log on.
Password Required. A String value.
The encrypted value of the password for the specified username.
To find the encrypted value, use the Password Encoder utility (Start > All Programs > Micro Focus > Password Encoder) or use the Data Table encryption option (right-click the unencrypted value in the cell and choose Data > Encrypt). For more information, see the Unified Functional Testing User Guide.
Language Required. A String value.
The 2-letter code for the language you want to use.
SystemNumber Optional. A long integer value.
The server system number.
Default value = 0
RoutingServers Optional. A String value.
The servers that are required in order to reach the server with which you want to connect.
Default value = ""

Return Type

None

Example

Back to top

 

AutoLogonByTargetSystem Method

Description

Connects and logs on to an SAP server according to its target system.

Syntax

object.AutoLogonByTargetSystem TargetSystem, Client, User, Password, Language

Arguments

ParameterDescription
TargetSystem Required. A String value.
The SAP environment that you want to test.
Client Required. A String value.
The SAP client you want to use.
User Required. A String value.
The username with which you want to log on.
Password Required. A String value.
The encrypted value of the password for the specified username.
To find the encrypted value, use the Password Encoder utility (Start > All Programs > Micro Focus > Micro Focus UFT One > Tools > Password Encoder) or use the Data Table encryption option (right-click the unencrypted value in the cell and choose Data > Encrypt). For more information, see the UFT One User Guide.
Language Required. A String value.
The 2-letter code for the language you want to use.

Return Type

None

Example

Back to top

 

CloseConnections Method

Description

Closes any SAP connections that were opened by UFT One or by the user.

Syntax

object.CloseConnections

Return Type

None

IMPORTANT

All open SAP connections are closed, both those opened by UFT One, and those opened by the user.

The exception to this is if the Do not record and run on settings that are already open check box is selected in the SAP tab of the Record and Run Settings dialog box. In this case, any sessions that were opened prior to the current session are not closed.

Example

Back to top

 

OpenConnection Method

Description

Opens a connection to the specified SAP server.

Syntax

object.OpenConnection ServerDescription

Arguments

ParameterDescription
ServerDescription Required. A String value.
The server to which you want to open a connection. The string is case-sensitive and must be identical to the one displayed in the SAP Logon dialog box.

Return Type

None

Example

Back to top

 

OpenConnectionByIP Method

Description

Opens a connection to the specified SAP server according to its IP address.

Syntax

object.OpenConnectionByIP ConnectionString, [SystemNumber], [RoutingServers]

Arguments

ParameterDescription
ConnectionString Required. A String value.
The connection string for the SAP server to which you want to open a connection.
SystemNumber Optional. A long integer value.
The server system number.
Default value = 0
RoutingServers Optional. A String value.
The servers that are required in order to reach the server with which you want to connect.
Default value = ""

Return Type

None

Example

Back to top

 

OpenConnectionByTargetSystem Method

Description

Opens a connection to the specified SAP server according to its target system.

Syntax

object.OpenConnectionByTargetSystem TargetSystem

Arguments

ParameterDescription
TargetSystem Required. A String value.
The SAP environment that you want to test.

Return Type

None

Example

Back to top

 

StartBPCATracing Method

Description

Begins running the Business Process Change Analyzer to detect changes in a transaction's objects (as compared to the TBOM).

Syntax

object.StartBPCATracing

Return Type

None

Example

Back to top

 

StopBPCATracing Method

Description

Stops running the Business Process Change Analyzer.

Syntax

object.StopBPCATracing

Return Type

None

Example

Back to top

See also: