SAP Actions

NeoLoad provides a set of ready-to-use SAP Actions. They are available in the Actions panel.

Note: The mapping between the actions carried out in an SAP client and the corresponding SAP Actions in NeoLoad are managed by a mapping file. Consequently, if an SAP Action is not supported by NeoLoad, a warning message is displayed in the "neoload.log" file. The message is "Mapping for SAP event not found". In this case, it is recommended to contact the NeoLoad Support providing them with the log files.

Prerequisites

Before using the SAP GUI-compatible version of NeoLoad, the following requirements must be fulfilled:

  • An SAP GUI client must be installed on your computer. Supported versions by NeoLoad are 7.4, 7.5, 7.6 and 7.7.

  • An SAP GUI client must be installed on each NeoLoad Load Generator.

  • SAP GUI 7.60 and 7.70 are supported by NeoLoad 64 bits since version 7.11. For older SAP GUI versions, the NeoLoad Controller used to record and the Load Generators to be used for SAP GUI tests must be 32 bits.

  • The Load Generators to be used for SAP GUI tests must be launched in process mode (service mode is not supported).

  • SAP GUI scripting must be enabled. For more information, see Enable SAP GUI scripting.

  • Supported O.S to record and run SAP GUI tests: Windows 7, Windows 10, Windows Server 2008, Windows Server 2012, Windows Server 2016.

  • Your license must include SAP Virtual Users to allow recording and replaying tests.

Note: SAP Virtual Users are reserved to Professional and Enterprise editions. For more information, see NeoLoad pricing.

SAP Actions description

The SAP object identification described below is common to all SAP Actions.

There are two ways to identify the SAP object on which the action will be performed:

  • By "id" with the “objectId” parameter.

  • By "name" with the “objectName”, “objectType” and “windowId” parameters.

If the “objectId”, “objectName”, “objectType”, and “windowId” parameters fields are filled in, the identification by "id" is tried first.

Click

This Action simulates a click action on an SAP GUI object.

Parameters

  • objectId (optional): The SAP GUI object identifier.

  • menuItem (optional): The id of the menu item.

  • toolbarButton (optional): The id of the toolbar button.

  • toolbarContextButton (optional): The id of the toolbar context button.

  • contextButton (optional): The id of the context button.

  • column (optional): The column index or column name of a grid or a table.

  • row (optional): The row index of a grid or a table.

  • nodeKey (optional): The key of a tree node.

  • indexes (optional):The indexes separated by “/” to reference a tree path. Example: 0/1/1/2.

  • itemName (optional): The item name of a tree.

  • buttonPress (optional): If set to true, a press button will be performed on a tree. Default value is “false”.

  • clickLink (optional): If set to "true", a click link will be performed on a tree.

  • changeCheckbox (optional): The value to set in a checkbox of a tree.

  • x (optional): The x coordinate when clicking on a picture.

  • y (optional): The y coordinate when clicking on a picture.

  • ignoreErrors (optional): If set to true, the Action will not be in error if object is not found, type is not supported or an exception is thrown. Default value is "false".

  • windowId (optional): The SAP GUI window identifier.

  • objectName (optional): The SAP GUI object name.

  • objectType (optional): The SAP GUI object type.

Example

Example of a "Click" Action on a button identified by id:

objectId: ses[0]/wnd[0]/tbar[1]/btn[28]

Same example on a button identified by name:

windowId: ses[0]/wnd[0]/

objectName: btn[28]

objectType: GuiButton

Example of a "Click" Action on a tree node:

objectId: ses[0]/wnd[0]/shellcont/shell/shellcont[1]/shell

nodeKey: D.1. 1

Example of a "Click" Action on a toolbar button of a grid:

objectId: ses[0]/wnd[0]/shellcont/shell/shellcont[1]/shell

toolbarButton: BUT2

Close

This Action simulates a close action on an SAP window or an SAP dialog.

Parameters

  • objectId (optional): The SAP GUI object identifier.

  • ignoreErrors (optional): If set to true, the Action will not be in error if object is not found, type is not supported or an exception is thrown. Default value is "false".

  • windowId (optional): The SAP GUI window identifier.

  • objectName (optional): The SAP GUI object name.

  • objectType (optional): The SAP GUI object type.

Example

Example of a "Close" Action on the main window.

objectId: ses[0]/wnd[0]

CloseAllSessions

This Action closes all SAP sessions for the current connection.

Collapse

This Action simulates a collapse action on an SAP tree object.

Parameters

  • objectId (optional): The SAP GUI object identifier.

  • nodeText (required): The text of the tree node.

  • ignoreErrors (optional): If set to true, the Action will not be in error if object is not found, type is not supported or an exception is thrown. Default value is "false".

  • windowId (optional): The SAP GUI window identifier.

  • objectName (optional): The SAP GUI object name.

  • objectType (optional): The SAP GUI object type.

By default, this Action is not considered as a request.

Connect

This Action opens a new SAP connection. The established connection is contextual to the User Path and will be used to perform all the other Actions (Click, Press, etc.).

When connectionString and connectionName parameters are both provided, the connectionString parameter will be used.

Parameters

  • connectionString (optional): The connection parameters to the SAP GUI server. Default value is "/H/192.168.0.1/S3201".

The connection parameters to the SAP server must comply with the following formats:

  • For a simple connection, the format must be: "/H/[IP address of the SAP application server]/S/32[Instance number]". “H” is for “Host” and “S” for “Service”.

  • For SAP routers, the format must be: "<router 1><router 2>...<router n><destination>”. Example with two routers (“gate.example.com”, port “3299”, and “gate.example.com”, port “3298”), the first using a password (secret), for a connection to the application server “test.example.com”, port 3200: “/H/gate.example.com/S/3299/P/secret/H/gate.example.com/S/3298/H/test.example.com/S/3200”

  • For message servers and Logon groups, the format must be: “'/M/' (message server hostname), '/S/' (message server port) and '/G/' (logon group)". Example with message server (hostname “example.com”, port number “4253”) and logon group (SPACE): “/M/example.com/S/4253/G/SPACE”.

  • connectionName (optional): The connection name in SAP Logon.

  • overrideLogonFolder (optional): The path to the SAP logon folder. Leave empty for autodetection or setting on Load Generator side.

  • noGuiMode (optional): GUI mode disabled. During a “Check User Path” process, the GUI mode is always enabled. Default value is "true".

Example

Connection of an SAP GUI client to the server 192.168.0.1:

connectionString: /H/192.168.0.1/S3201

DoubleClick

This Action simulates a double click action on an SAP object.

Parameters

objectId (optional): The SAP GUI object identifier.

column (optional): The column index or column name of a grid or a table.

row (optional): The row index of a grid or a table.

nodeKey (optional): The node key of a tree.

itemName (optional): The item name of a tree.

x (optional): The x coordinate when clicking on a picture.

y (optional): The y coordinate when clicking on a picture.

ignoreErrors (optional): If set to true, the Action will not be in error if object is not found, type is not supported or an exception is thrown. Default value is "false".

windowId (optional): The SAP GUI window identifier.

objectName (optional): The SAP GUI object name.

objectType (optional): The SAP GUI object type.

Example

Example of a "Double-click" Action on the current selected cell of a grid:

objectId: ses[0]/wnd[0]/usr/cntlSINWP_CONTAINER/shellcont/shell

Event

This Action simulates an event on an SAP HTML viewer.

Parameters

  • objectId (optional): The SAP GUI object identifier.

  • frame (optional): The HTML frame.

  • data (optional): The POST data to send.

  • url (optional): The URL of the event.

  • ignoreErrors (optional): If set to "true", the Action will not be in error if object is not found, type is not supported or an exception is thrown. Default value is "false".

  • windowId (optional): The SAP GUI window identifier.

  • objectName (optional): The SAP GUI object name.

  • objectType (optional): The SAP GUI object type.

Example

Example of a “click” on an HTML page:

objectId: ses[0]/wnd[0]/usr/subSA_0100_1:SAPLEXAMPLE_ENTRY_SCREEN:0200/subSA_200_1:SAPLEXAMPLE_ENTRY_SCREEN:0800/cntlCC_HTML_INDEX/shellcont/shell

url: sapevent:PRESS_ME?MYPARAMERS

Expand

This Action simulates an expand action on an SAP tree object.

Parameters

objectId (optional): The SAP GUI object identifier.

nodeKey (optional): The node key of a tree.

nodeLabel (optional): To identify a tree node via its label.

indexes (optional): The node indexes separated by “/” to identify a tree node by path. Example: "1/1/1/2".

ignoreErrors (optional): If set to true, the Action will not be in error if object is not found, type is not supported or an exception is thrown. Default value is "false".

windowId (optional): The SAP GUI window identifier.

objectName (optional): The SAP GUI object name.

objectType (optional): The SAP GUI object type.

Example

Example of an "Expand" Action on a tree node:

objectId: ses[0]/wnd[0]/shellcont/shell/shellcont[1]/shell

nodeKey: B.999

Press

This Action simulates a key press action on an SAP object.

Parameters

objectId (optional): The SAP GUI object identifier.

key (required): The keyboard key. For example: "ENTER".

ignoreErrors (optional): If set to true, the Action will not be in error if object is not found, type is not supported or an exception is thrown. Default value is "false".

windowId (optional): The SAP GUI window identifier.

objectName (optional): The SAP GUI object name.

objectType (optional): The SAP GUI object type.

Example

Example of a “Press” Action on the “Enter” key in the SAP GUI main window:

objectId: ses[0]/wnd[0]

key: Enter

Example of a “Press” Action on the “F4” key in the current selected cell of a grid:

objectId: ses[0]/wnd[0]/usr/cntlGRID1/shellcont/shell/shellcont[1]/shell

key: F4

Read

This Action reads the label of an SAP object and returns the value in the response of the Action.

Parameters

objectId (optional): The SAP GUI object identifier.

column (optional): The column index or column name of a grid or a table.

row (optional): The row index of a grid or a table.

nodeKey (optional): The node key of a tree.

itemName (optional): The item name of a tree.

textVariable (optional): The variable name of the text result.

typeVariable (optional): The variable name of the type result. Only used for status bar. Possible values are "Success", "Warning" and "Error".

ignoreErrors (optional): If set to true, the Action will not be in error if object is not found, type is not supported or an exception is thrown. Default value is "false".

windowId (optional): The SAP GUI window identifier.

objectName (optional): The SAP GUI object name.

objectType (optional): The SAP GUI object type.

By default, this Action is not considered as a request.

Example

Example of a "Read" Action on the text included in the SAP GUI status bar:

objectId: ses[0]/wnd[0]/sbar

Resize

This Action simulates a resize of the working panel.

Parameters

objectId (optional): The SAP GUI object identifier.

width (optional): The width of the window.

height (optional): The height of the window.

ignoreErrors (optional): If set to "true", the Action will not be in error if object is not found, type is not supported or an exception is thrown. Default value is "false".

windowId (optional): The SAP GUI window identifier.

objectName (optional): The SAP GUI object name.

objectType (optional): The SAP GUI object type.

Example

Example of a resize of the working panel:

objectId: ses[0]/wnd[0]

width: 163

height: 19

RightClick

This Action simulates a right click action on an SAP object.

Parameters

objectId (optional): The SAP GUI object identifier.

column (optional): The column index or column name of a grid or a table.

row (optional): The row index of a grid or a table.

nodeKey (optional): The node key of a tree.

itemName (optional): The item name of a tree.

ignoreErrors (optional): If set to true, the Action will not be in error if object is not found, type is not supported or an exception is thrown. Default value is "false".

windowId (optional): The SAP GUI window identifier.

objectName (optional): The SAP GUI object name.

objectType (optional): The SAP GUI object type.

Example

Example of a “Right Click” Action on the current selected cell of a grid:

objectId: ses[0]/wnd[0]/usr/cntlGRID1/shellcont/shell/shellcont[1]/shell

Select

This Action simulates a select action on an SAP radio button, check box, combo box or grid.

Parameters

objectId (optional): The SAP GUI object identifier.

optionValue (optional): The value of a combo box.

value (optional): The value of a grid or a table.

column (optional): The column name of a grid.

rows (optional): The row indexes of a grid separated by “,”. Ex: "1,2".

absoluteRow (optional): The absolute row index of a table.

currentCellRow (optional): The index of the current cell of a grid.

currentCellClumn (optional): The name of the current column of a grid.

pressColumnHeader (optional): The column name of a grid.

start (optional): The start index when selecting lines of a text edit.

end (optional): The end index when selecting lines of a text edit.

selectionChanged (optional): If "true", performs a selectionChanged on the grid.

all (optional): If “true”, selects the entire grid. Default value is “false”.

topNode (optional): If "true", performs a setTopNode on the tree.

selectionInterval (optional): An interval of two dates separated by ",": YYYYMMDD,YYYYMMDD to select in a calendar.

firstVisibleRow (optional): The first visible row in a grid.

ignoreErrors (optional): If set to true, the Action will not be in error if object is not found, type is not supported or an exception is thrown. Default value is "false".

windowId (optional): The SAP GUI window identifier.

objectName (optional): The SAP GUI object name.

objectType (optional): The SAP GUI object type.

By default, this Action is not considered as a request.

Examples

Example of a "Select" Action on an absolute row in a grid:

objectId: ses[0]/wnd[1]/usr/tblSAPLSKBHTC_FIELD_LIST_820

absoluteRow: 3

Example of a "Select" Action on a cell in a grid:

objectId: ses[0]/wnd[0]/usr/cntlGRID1/shellcont/shell/shellcont[1]/shell

currentCellRow: 1

currentCellColumn: INSTANCE

Example of a "Select" Action that selects multiple rows of a grid:

objectId: ses[0]/wnd[1]/usr/cntlGRID/shellcont/shell

rows: 1,2

SetText

This Action simulates a "set text" action in an SAP text field.

Parameters

objectId (optional): The SAP GUI object identifier.

value (required): The text value.

column (optional): The column index or column name of a grid or a table.

row (optional): The row index of a grid or a table.

ignoreErrors (optional): If set to true, the Action will not be in error if object is not found, type is not supported or an exception is thrown. Default value is "false".

windowId (optional): The SAP GUI window identifier.

objectName (optional): The SAP GUI object name.

objectType (optional): The SAP GUI object type.

By default, this Action is not considered as a request.

Example

Example of a "SetText" Action on a user name text field:

objectId: ses[0]/wnd[0]/usr/txtRSYST-BNAME

value: MyUserName

SetFocus

This Action simulates a set focus action in an SAP object.

Parameters

objectId (optional): The SAP GUI object identifier.

column (optional): The column index or column name of a grid or a table.

row (optional): The row index of a grid or a table.

ignoreErrors (optional): If set to true, the Action will not be in error if object is not found, type is not supported or an exception is thrown. Default value is "false".

windowId (optional): The SAP GUI window identifier.

objectName (optional): The SAP GUI object name.

objectType (optional): The SAP GUI object type.

Example

Example of a "SetFocus" Action on a language text field:

objectId: ses[0]/wnd[0]/usr/txtRSYST-LANGU

objectName: RSYST-LANGU

objectType: GuiTextField

Unselect

This Action simulates an unselect action on an SAP table object or an SAP tree object.

Parameters

objectId (optional): The SAP GUI object identifier.

content (optional): The office content name to remove.

clear (optional): If true, the entire selection is cleared. Default value is “false”.

nodeKey (optional): The node key of a tree.

ignoreErrors (optional): If set to true, the Action will not be in error if object is not found, type is not supported or an exception is thrown. Default value is "false".

windowId (optional): The SAP GUI window identifier.

objectName (optional): The SAP GUI object name.

objectType (optional): The SAP GUI object type.

Example

Example of an "Unselect" Action that clears the selection in a tree:

objectId: ses[0]/wnd[0]/usr/cntlSINWP_CONTAINER/shellcont/shell

clear: true

IsSelected

This Action checks whether an SAP object is selected or not. The result will be returned in the response or in the optional parameter.

Parameters

objectId (optional): The SAP GUI object identifier. Default value is "ses[0]/".

windowId (optional): The SAP GUI window identifier.

objectName (optional): The SAP GUI object name.

objectType (optional): The SAP GUI object type.

nodeKey (optional): The node key of a tree.

itemName (optional): The item name of a tree.

column (optional): The column index of a table or the column name of a grid.

row (optional): The row index of a grid or a table.

ignoreErrors (optional): If set to "true", the action will not be in error if object is not found, type is not supported or an exception is thrown. Default value is "false".

variable (optional): The variable name of the result.

Examples

Example of a "isSelected" Action on a check box:

objectId: ses[0]/wnd[1]/usr/chk130_TCODE

variable: isCheckBoxSelected

Example of a "isSelected" Action on a radio buton:

objectId: ses[0]/wnd[0]/usr/radGS_DYN310-SEL_PROJ_IMG

variable: isRadioButtonSelected

Example of a "isSelected" Action on a row of a table:

objectId: ses[0]/wnd[0]/usr/tabsCTS/tabpTAB_ATT/ssubCSS:SAPLSEOD:0252/tblSAPLSEODAC

row: 1

variable: isRowSelected

Example of a "isSelected" Action on a column of a table:

objectId: ses[0]/wnd[0]/usr/tabsCTS/tabpTAB_ATT/ssubCSS:SAPLSEOD:0252/tblSAPLSEODAC

column: 1

variable: isColumnSelected

Example of a "isSelected" Action on a cell (a check box or a radio button) of a table:

objectId: ses[0]/wnd[0]/usr/tabsCTS/tabpTAB_ATT/ssubCSS:SAPLSEOD:0252/tblSAPLSEODAC

row: 1

column: 3

variable: isCellSelected

IsChangeable

This Action checks if an object is enabled and writable.

Parameters

objectId (optional): The SAP GUI object identifier.

column (optional): The column index of a table or the column name of a grid.

row (optional): The row index of a grid or a table.

variable (optional): Name of the variable where the value will be stored.

ignoreErrors (optional): If set to true, the action will not be in error if object is not found, type is not supported or an exception is thrown. Default value is "false".

windowId (optional): The SAP GUI window identifier.

objectName (optional): The SAP GUI object name.

objectType (optional): The SAP GUI object type.

Examples

Example of an "IsChangeable" Action on a radio button:

objectId: ses[0]/wnd[0]/usr/radPPE51_1000-PDSYSDOC

Example of an "IsChangeable" Action on a cell of a grid:

objectId: ses[0]/wnd[0]/usr/cntlSINWP_CONTAINER/shellcont/shell

row: 0

column: 1

IsAvailable

This Action checks whether an SAP object exists or not. The result will be returned in the response or in the optional parameter.

Parameters

objectId (optional): The SAP GUI object identifier. Default value is "ses[0]/".

windowId (optional): The SAP GUI window identifier.

objectName (optional): The SAP GUI object name.

objectType (optional): The SAP GUI object type.

variable (optional): The variable name of the result.

Example

Example of an "IsAvailable" Action on a object:

objectId: ses[0]/wnd[0]/usr/pwdRSYST-BCODE

variable: isAvailableVariable