SAPGuiTable Object

Description

A table control in an SAP GUI for Windows application.

Operations

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

Note: You can also view a list and descriptions of the SAPGuiTable description properties, for use in object repository descriptions, programmatic descriptions, checkpoint and output value steps, and as argument values for the GetTOProperty and GetROProperty methods.

Methods

Method ActivateCellDouble-clicks the specified cell in a table.
Common Method CaptureBitmapSaves a screen capture of the object as a .png or .bmp image using the specified file name.
Common Method CheckChecks whether the actual value of an item matches the expected value.
Common Method CheckPropertyChecks whether the actual value of the specified object property matches the specified expected value within the specified timeout.
Common Method ChildObjectsReturns the collection of child objects contained within the object.
Common Method GetAllROProperties

Returns the collection of properties and current values from the object in the application.

Method ClickCellEmulates a click on the specified cell in a table.
Method ColumnCountRetrieves the number of columns in the table.
Method DeselectColumnClears the selection of the specified column.
Method DeselectRowClears the selection of the specified row.
Method DeselectRowsRangeClears the selection of the specified rows in the table.
Method ExtendColumnSelects an additional column in the table.
Method ExtendRowSelects an additional row in the table.
Method ExtendRowsRangeAdds the specified range of rows to the selected rows in the table.
Method FindAllRowsByCellContentRetrieves all rows of all cells in the given column whose content matches the specified data.
Method FindRowByCellContentRetrieves the first row of the cell in the given column whose content matches the specified data.
Method GetCellDataReturns the data contained in the specified cell.

Method GetCellDataEx

Returns a cell's content from a row with specific content in another cell.

Method GetCellLengthRetrieves the maximum length of the cell.
Common Method GetROPropertyReturns the current value of the description property from the object in the application.
Common Method GetTOPropertiesReturns the collection of properties and values used to identify the object.
Common Method GetTOPropertyReturns the value of the specified description property from the test object description.
Common Method HighlightHighlights the object in the application.
Method InputRecords an Input statement each time new or modified table cell data is sent to the SAP server.
Method IsCellEditableChecks whether the cell is editable.
Method OpenPossibleEntriesOpens the list of possible entries for a table.
Common Method OutputRetrieves the current value of an item and stores it in a specified location.
Method PressSettingsButtonPresses the table setting button.
Common Method RefreshObjectInstructs UFT One to re-identify the object in the application the next time a step refers to this object.
Method RowCountReturns the number of rows in the table.
Method SelectAllColumnsSelects all columns in the table.
Method SelectCellSelects the specified cell in a table.
Method SelectColumnSelects the specified column in the table.
Method SelectRowSelects the specified row in the table.
Method SelectRowsRangeSelects the specified range of rows in the table.
Method SetCellDataSets the cell contents with the specified data.
Common Method SetTOPropertySets the value of the specified description property in the test object description.
Common Method ToStringReturns a string that represents the test object.
Method ValidRowIndicates whether or not the specified row is a valid row for the table.
Common Method WaitPropertyWaits until the specified object property achieves the specified value or exceeds the specified timeout before continuing to the next step.

Properties

Common Property ExistChecks whether the object currently exists in the open application.
Common Property ObjectAccesses the native methods and properties of the object.

Back to top

 

ActivateCell Method

Description

Double-clicks the specified cell in a table.

Syntax

object.ActivateCell (Row, Column)

Arguments

ParameterDescription
Row Required. A long integer value.
The row number of the cell to activate.
Row numbers begin with 1.
Column Required. A String value.
The column of the cell to activate. The column can be specified by the column's label or column number in the format "#index".
Column numbers begin with 1.

Return Type

None.

IMPORTANT

This method is not recorded. To add this method to your test, use the Step Generator or enter it manually in the Keyword View or Editor. For more information, see the Unified Functional Testing User Guide.

Example

Back to top

 

ClickCell Method

Description

Emulates a click on the specified cell in a table.

Syntax

object.ClickCell (Row, Column)

Arguments

ParameterDescription
Row Required. A long integer value.
The row number of the cell to click.
Row numbers begin with 1.
Column Required. A String value.
The column of the cell to click. The column can be specified by the column's label or column number in the format "#index".
Column numbers begin with 1.

Return Type

None.

IMPORTANT

This method is generally recorded when a button is pressed within a cell or if another item is pressed, resulting in a communication with the SAP server.

Example

Back to top

 

ColumnCount Method

Description

Retrieves the number of columns in the table.

Syntax

object.ColumnCount

Return Type

A Variant.

Example

Back to top

 

DeselectColumn Method

Description

Clears the selection of the specified column.

Syntax

object.DeselectColumn (Column)

Arguments

ParameterDescription
Column Required. A String value.
The column to deselect.The column can be specified by the column's label or column number in the format "#index".
Column numbers begin with 1.

Return Type

None.

Example

Back to top

 

DeselectRow Method

Description

Clears the selection of the specified row.

Syntax

object.DeselectRow (Row)

Arguments

ParameterDescription
Row Required. A long integer value.
The number of the row to deselect.
Row numbers begin with 1.

Return Type

None.

IMPORTANT

This method is valid only for tables that support multiple row selection.

Example

Back to top

 

DeselectRowsRange Method

Description

Clears the selection of the specified rows in the table.

Syntax

object.DeselectRowsRange (From, To)

Arguments

ParameterDescription
From Required. A long integer value.
The number of the first row to deselect.
Row numbers begin with 1.
To Required. A long integer value.
The number of the last row to deselect.
Row numbers begin with 1.

Return Type

None.

IMPORTANT

This method is valid only for tables that support multiple row selection.

Example

Back to top

 

ExtendColumn Method

Description

Selects an additional column in the table.

Syntax

object.ExtendColumn (Column)

Arguments

ParameterDescription
Column Required. A String value.
The column to add to the selection. The column can be specified by the column's label or column number in the format "#index".
Column numbers begin with 1.

Return Type

None.

IMPORTANT

This method is valid only for tables that support multiple column selection.

Example

Back to top

 

ExtendRow Method

Description

Selects an additional row in the table.

Syntax

object.ExtendRow (Row)

Arguments

ParameterDescription
Row Required. A long integer value.
The number of the row to add to the selection.
Row numbers begin with 1.

Return Type

None.

IMPORTANT

This method is not recorded. To add this method to your test, use the Step Generator or enter it manually in the Keyword View or Editor. For more information, see the Unified Functional Testing User Guide.


This method is valid only for tables that support multiple row selection.

Example

Back to top

 

ExtendRowsRange Method

Description

Adds the specified range of rows to the selected rows in the table.

Syntax

object.ExtendRowsRange (From, To)

Arguments

ParameterDescription
From Required. A long integer value.
The number of the first row to add to the selection.
Row numbers begin with 1.
To Required. A long integer value.
The number of the last row to add to the selection.
Row numbers begin with 1.

Return Type

None.

IMPORTANT

This method is not recorded. To add this method to your test, use the Step Generator or enter it manually in the Keyword View or Editor. For more information, see the Unified Functional Testing User Guide.


This method is valid only for tables that support multiple row selection.

Example

Back to top

 

FindAllRowsByCellContent Method

Description

Retrieves all rows of all cells in the given column whose content matches the specified data.

Syntax

object.FindAllRowsByCellContent (Col, CellText)

Arguments

ParameterDescription
Col Required. A Variant.
The column in which you want to search. The column can be specified by the column's label or column number in the format " #index".
Column numbers begin with 1.
CellText Required. A Variant.
The data for which you want to search.

Return Type

A Variant.

Example

Back to top

 

FindRowByCellContent Method

Description

Retrieves the first row of the cell in the given column whose content matches the specified data.

Syntax

object.FindRowByCellContent (Col, CellText, [StartFromRow])

Arguments

ParameterDescription
Col Required. A Variant.
The column in which you want to search. The column can be specified by the column's label or column number in the format " #index".
Column numbers begin with 1.
CellText Required. A Variant.
The data for which you want to search.
StartFromRow Optional. A Variant.
The row in which you want the search to start. Row numbers begin with 1.
Default value = 1

Return Type

A Variant.

If no content matches the specified value, the return value is NULL.

Example

Back to top

 

GetCellData Method

Description

Returns the data contained in the specified cell.

Syntax

object.GetCellData (Row, Column)

Arguments

ParameterDescription
Row Required. A long integer value.
The row number of the cell for which you want to retrieve data.
Row numbers begin with 1.
Column Required. A String value.
The column of the cell for which you want to retrieve data. The column can be specified by the column's label or column number in the format "#index".
Column numbers begin with 1.

Return Type

A Variant.

Example

Back to top

 

GetCellDataEx Method

Description

Returns a cell's content from a row with specific content in another cell.

This method performs the equivalent of FindRowByCellContent and GetCellData, retrieving the content of the specified column from the first row found with the specified content.

Syntax

object.GetCellDataEx (Column, ByColumn, ByValue, [StartFromRow])

Arguments

ParameterDescription
Column Required. A String value.
The column of the cell for which you want to retrieve data. The column can be specified by the column's label or column number in the format "#index".
Column numbers begin with 1.
ByColumn Required. A Variant.
The column in which you want to search for the value specified in the ByValue argument. The column can be specified by the column's label or column number in the format " #index".
Column numbers begin with 1.
ByValue

Required. A String.

The value for which to search in the column specified in the ByColumn argument.

StartFromRow Optional. A Variant.
The row in which you want the search to start. Row numbers begin with 1.
Default value = 1

Return Type

A Variant.

Example

Back to top

 

GetCellLength Method

Description

Retrieves the maximum length of the cell.

Syntax

object.GetCellLength (Row, Col)

Arguments

ParameterDescription
Row Required. A long integer value.
The row number of the cell whose length you want to retrieve.
Row numbers begin with 1.
Col Required. A Variant.
The column of the cell whose length you want to retrieve. The column can be specified by the column's label or column number in the format " #index".
Column numbers begin with 1.

Return Type

A Variant.

Example

Back to top

 

Input Method

Description

Records an Input statement each time new or modified table cell data is sent to the SAP server.

Syntax

object.Input (DataSheet, [ScrollMethod])

Arguments

ParameterDescription
DataSheet Required. A String value.
The name of the input data sheet containing the data for the table.
ScrollMethod Optional. A tagSCROLL_METHOD Value.
The keyboard key that UFT One uses to scroll or add rows to the table if the input data sheet includes rows that exceed the number of rows currently displayed in the application.
Possible values:
82 or PAGEDOWN (default): Sends a Page Down key command to scroll the table.
0 or ENTER: Sends an Enter key command to scroll the table.
For details on when to use this argument, refer to the "Using the Auto-Parameterize Option to Parameterize Table Cell Values" section of the Unified Functional Testing SAP Solutions Add-in Guide.
Default value = micPageDown

Return Type

None.

IMPORTANT

This method is recorded only if the Auto-parameterize table and grid controls option is selected in the SAP pane of the Options dialog box.

When the Auto-parameterize table and grid controls option is selected, an Input statement is recorded each time new or modified table cell data is sent to the SAP server. The statement represents all cell values that were set prior to sending the data to the server.

For each recorded Input method, a corresponding input data sheet is automatically inserted in the test's Data Table as a sub-sheet of the action data sheet containing the recorded cell values. Columns are added to the data sheet only for cells containing input data.

Once the new input data sheet has been created by recording the Input statement, you can add or modify the data set, and add additional data sets for each action iteration.

During the test run, this method inserts the values from the input data sheet specified by the SheetName argument into the table.

During each action iteration, the values of all cells in the relevant data set of the input data sheet are inserted into the table according to the row position and column name.

Notes:

You must record the Input method using the Auto-parameterize table and grid controls option to create the input data sheet. You cannot create the required input data sheet manually.

A SelectCell method is automatically recorded after each Input statement.

When the Auto-parameterize table and grid controls option is not selected, a SetCellData statement is recorded for each value you set in a table cell.

For a detailed explanation of how to work with the Input statement and how to edit or add data sets to the input data sheet, refer to the "Using the Auto-Parameterize Option to Parameterize Table Cell Values" section of the Unified Functional Testing SAP Solutions Add-in Guide.

Example

Back to top

 

IsCellEditable Method

Description

Checks whether the cell is editable.

Syntax

object.IsCellEditable (Row, Col)

Arguments

ParameterDescription
Row Required. A long integer value.
The row number of the cell to check.
Row numbers begin with 1.
Col Required. A Variant.
The column of the cell to check. The column can be specified by the column's label or column number in the format " #index".
Column numbers begin with 1.

Return Type

A Variant.

Example

Back to top

 

OpenPossibleEntries Method

Description

Opens the list of possible entries for a table.

Syntax

object.OpenPossibleEntries (Row, Column)

Arguments

ParameterDescription
Row Required. A long integer value.
The row number of the cell for which you want to open the Possible Entries dialog box.
Row numbers begin with 1.
Column Required. A String value.
The column of the cell for which you want to open the Possible Entries dialog box. The column can be specified by the column's label or column number in the format "#index".
Column numbers begin with 1.

Return Type

None.

IMPORTANT

This method is not recorded for table controls. Instead a SelectCell step followed by a SendKey F4 step is recorded when you press F4 to open the Possible Entries dialog box for a cell in a table control. However, if you manually enter an OpenPossibleEntries statement for a table control, it runs successfully.

Example

Back to top

 

PressSettingsButton Method

Description

Presses the table setting button.

Syntax

object.PressSettingsButton

Return Type

None.

Example

Back to top

 

RowCount Method

Description

Returns the number of rows in the table.

Syntax

object.RowCount

Return Type

A Variant.

IMPORTANT

The value returned for this method is only an approximation when performed on a table control. We recommend using the ValidRow method instead of, or in conjunction with, this method.

Example

Back to top

 

SelectAllColumns Method

Description

Selects all columns in the table.

Syntax

object.SelectAllColumns

Return Type

None.

Example

Back to top

 

SelectCell Method

Description

Selects the specified cell in a table.

Syntax

object.SelectCell (Row, Column)

Arguments

ParameterDescription
Row Required. A long integer value.
The row number of the cell to select.
Row numbers begin with 1.
Column Required. A String value.
The column of the cell to select. The column can be specified by the column's label or column number in the format "#index".
Column numbers begin with 1.

Return Type

None.

IMPORTANT

The SelectCell and SendKey F4 steps are recorded whenever an F4 Help (Possible Entries) dialog box is opened for a table control.

Example

Back to top

 

SelectColumn Method

Description

Selects the specified column in the table.

Syntax

object.SelectColumn (Column)

Arguments

ParameterDescription
Column Required. A String value.
The column to select. The column can be specified by the column's label or column number in the format "#index".
Column numbers begin with 1.

Return Type

None.

Example

Back to top

 

SelectRow Method

Description

Selects the specified row in the table.

Syntax

object.SelectRow (Row)

Arguments

ParameterDescription
Row Required. A long integer value.
The number of the row to select.
Row numbers begin with 1.

Return Type

None.

Example

Back to top

 

SelectRowsRange Method

Description

Selects the specified range of rows in the table.

Syntax

object.SelectRowsRange (From, To)

Arguments

ParameterDescription
From Required. A long integer value.
The number of the first row to select.
Row numbers begin with 1.
To Required. A long integer value.
The number of the last row to select.
Row numbers begin with 1.

Return Type

None.

IMPORTANT

This method is valid only for tables that support multiple row selection.

Example

Back to top

 

SetCellData Method

Description

Sets the cell contents with the specified data.

Syntax

object.SetCellData (Row, Column, Data)

Arguments

ParameterDescription
Row Required. A long integer value.
The row number of the cell for which you want to specify data.
Row numbers begin with 1.
Column Required. A String value.
The column of the cell for which you want to specify data. The column can be specified by the column's label or column number in the format "#index".
Column numbers begin with 1.
Data Required. A String value.
The data to set for the specified cell. The possible values for the data depends on the type of cell. For example, the values may be "ON" or "OFF" for a check box or radio button cell, or may be limited to the available values of a combo box.

Return Type

None.

IMPORTANT

This method is recorded only when the Auto-parameterize tables and grids option is not selected in the SAP pane of the Options dialog box.

Example

Back to top

 

ValidRow Method

Description

Indicates whether or not the specified row is a valid row for the table.

Syntax

object.ValidRow (Row)

Arguments

ParameterDescription
Row Required. A long integer value.
The row number you want to check.
Row numbers begin with 1.

Return Type

A Variant.

IMPORTANT

This method is especially useful when working with table control objects, for which the RowCount Method can only retrieve an estimated row count.

Example

Back to top

See also: