Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

SAP Connector methods

The SAP connector provides various methods that you can use to automate workflows on SAP graphical user interface (GUI) interfaces. SAP connector methods are available at different levels - connector, screen, and element.

SAP Connector methods

The SAP Connector methods are available at three levels.

  • Application: You can find these methods when you double-click the SAP connector object. To access these methods, do the following steps:

    1. Add the SAP connector under the Global Objects in the Project Explorer pane.

      For more information, see Configure the SAP connector.

    2. Double-click the SAP connector object.

      The methods appear in the Object Explorer pane.

  • Screen: Use these methods to automate tasks on an SAP application screen that you have added. For example, automate the maximizing of an application window. To access these methods, do the following steps:

    1. Add one or more SAP application screens. To learn to configure, see Configure the SAP connector.
    2. Double-click the screen that you've added.

      The methods appear in the Object Explorer pane.

  • Element: Use these methods to automate actions on the SAP screen UI elements, for example, a button or a check box. For example, automate the selecting of a button. To access these methods, do the following steps:

    1. Add one or more SAP application screens. To learn to configure, see Configure the SAP connector.
    2. Capture one or more screen elements. To learn to capture, see Use the Capture element dialog.

      The screen elements appear under the captured SAP screen.

    3. Double-click the screen element.

      The methods appear in the Object Explorer pane.

Use the methods

To create an automation by using the methods, drag them from the Object Explorer pane to the Design surface and connect them.

Image omitted: SAP-connector-methods-connected.png
Methods connected.

Application-level methods

  • OpenConnection

    Establishes a connection between the connector and the SAP application. You must first use this method before executing an automation.

    ParameterDescriptionData port entry typeData typeDefault valueMandatory?
    nameName of the connection.Data InStringNoneYes
    usernameUser name for making the connection.Data InStringNoneYes
    passwordPassword for making the connection.Data InStringNoneYes
  • SetDefaultSession

    Makes the selected session a default session.

    ParameterDescriptionData port entry typeData typeDefault valueMandatory?
    sessionIdUnique Id of the session that you want to set as default.Data InStringNoneYes
  • CloseConnection

    Closes the connection between the connector and the SAP application.

Screen-level methods

  • ClickMenuItem

    Selects the menu item that you specify the ID of on the SAP screen.

    ParameterDescriptionData port entry typeData typeDefault valueMandatory?
    menuIdThe ID of the menu that must be selected.Data InStringNoneYes
  • Close

    Closes the session of the SAP screen.

  • CreateSession

    Creates a session of the SAP screen.

    ParameterDescriptionData port entry typeData typeDefault valueMandatory?
    tCodeTransaction code that enables you to access specific part of the SAP application.Data InStringNAYes
    ReturnReturns the Id of the session created.Data OutStringNANA
  • EndSession

    Ends the open session.

  • EndTransaction

    Ends a transaction.

  • Focus

    Sets the focus on the open session.

  • GetMenuItem

    Gets the name of the specified menu item.

    ParameterDescriptionData port entry typeData typeDefault valueMandatory?
    menuIdID of the menu item to get the name.Data InStringNoneYes
    ReturnReturns the name of the menu itemData OutStringNoneNA
  • GetMenuItemsIdsByName

    Retrieves the ID of the menu that you specify by its name.

    ParameterDescriptionData port entry typeData typeDefault valueMandatory?
    menuItemNameName of the menu item.Data OutListNoneNA
  • GetWindowHandle

    Returns the window handle of the SAP application screen.

  • IsCreated

    Returns true if the session is created, false if the session isn’t created.

  • IsSessionBusy

    Returns true if the session is busy, and false if the session isn’t busy.

  • Maximise

    Maximizes the SAP screen.

  • Minimise

    Minimizes the SAP screen.

  • Resize

    Resizes the SAP screen according to the dimensions specified.

    ParameterDescriptionData port entry typeData typeDefault valueMandatory?
    xPosPosition of the screen along the X-axis.Data InIntegerNoneYes
    yPosPosition of the screen along the Y-axis.Data InIntegerNoneYes
    WidthWidth of the screen.Data InIntegerNoneYes
    HeightHeight of the screen.Data InIntegerNoneYes
  • Restore

    Restores the screen to its original dimensions.

  • ScreenId

    Returns the ID of the SAP application screen as a string.

  • SendKeys

    Sends the keyboard strokes to the SAP application screen.

    ParameterDescriptionData port entry typeData typeDefault valueMandatory?
    KeysKeyboard strokes that you want to send to the SAP screen.Data InStringNAYes
  • StartTransaction

    Starts a transaction.

    ParameterDescriptionData port entry typeData typeDefault valueMandatory?
    tCodeTransaction code that enables you to access specific part of the SAP application.Data InStringNAYes
  • WaitForCreate

    Waits for the specified duration while the screen is being created. This enables all the dynamic controls to load after the screen is created.

    ParameterDescriptionData port entry typeData typeDefault valueMandatory?
    timeoutInSecondsDuration after which the method times out.Data InIntegerNoneYes
    MatchAllChildrenOption to indicate whether before loading the screen, the method matches all the captured children screens and elements with the screen.Data InBooleanFalseNo

Element-level methods

In the SAP connector, you can use these element-level methods to identify elements, verify their presence on the screen, or define actions to be performed on the elements.

The following tables include elements and their available methods. For the description of these methods and their parameters, see SAP Connector methods.

ElementMethods
GuiButtonClick
Highlight
IsCreated
MouseClick
SendKeys
SetFocus
WaitForCreate
ElementMethods
GuiCheckBoxCheck
Highlight
IsChecked
IsCreated
SendKeys
SetFocus
Uncheck
MouseClick
WaitForCreate
ElementMethods
GuiComboBoxGet
GetIconName
GetList
Highlight
IsCreated
SendKeys
Set
SetFocus
MouseClick
WaitForCreate
ElementMethods
GuiCtrlGridViewClickButtonCell
ClickCell
DeselectAllRows
GetCellType
GetCellValue
GetColumns
GetColumnsKeyValuePair
GetRowCount
GetRows
GetRowsByColumn
GetSelectedColumns
GetSelectedRows
GetSingleRow
GetVisibleRows
Highlight
IsCreated
MouseClick
SendKeys
SetFocus
SelectAllRows
SelectCell
SelectContextMenuItemById
SelectContextMenuItemByPosition
SelectContextMenuItemByText
SelectSingleRow
SelectToolbarMenuItemById
SelectToolbarMenuItemByPosition
SelectToolbarMenuItemByText
SetCellValue
WaitForCreate
ElementMethods
GuiLabelGetText
Highlight
IsCreated
MouseClick
SendKeys
SetFocus
WaitForCreate
ElementMethods
GuiPasswordHighlight
IsCreated
SendKeys
SetCaretPosition
SetFocus
SetText
MouseClick
WaitForCreate
ElementMethods
GuiRadioButtonHighlight
IsChecked
IsCreated
Select
SendKeys
SetFocus
MouseClick
WaitForCreate
ElementMethods
GuiStatusBarGetStatus
Highlight
IsCreated
MouseClick
SendKeys
SetFocus
WaitForCreate
ElementMethods
GuiTabHighlight
IsCreated
SelectTab
SendKeys
SetFocus
MouseClick
WaitForCreate
ElementMethods
GuiTableControlDeselectAllVisibleRows
DeselectRow
DeselectVisibleRow
GetAllVisibleRows
GetColumnNames
GetMaximumScrollOffset
GetScrollPosition
GetSingleRow
GetTable
GetVisibleRowCount
Highlight
IsCreated
MouseClick
ScrollDownByOneRow
ScrollToHorizontalPosition
ScrollToNextPage
ScrollToPreviousPage
ScrollToVerticalPosition
ScrollUpByOneRow
SelectAllRows
SelectSingleRow
SelectVisibleRow
SendKeys
SetFocus
WaitForCreate
ElementMethods
GuiTextBoxGetText
Highlight
IsCreated
SendKeys
SetCaretPosition
SetFocus
SetText
MouseClick
WaitForCreate
ElementMethods
GuiTreeCheck
ClickNodeItem
CollapseNodeItem
DoubleClickNode
DoubleClickNodeItem
GetColumnsKeyValuePair
GetTreeType
GetNodeKeyByPath
GetNodeKeyByText
GetNodeItemText
GetSelectedNodes
GetNodeItemCheckBoxState
Highlight
IsCreated
PressNodeItemButton
SelectTab
SendKeys
SetFocus
MouseClick
SelectNodeItem
SelectNode
SelectContextMenuItemById
SelectContextMenuItemByText
SelectContextMenuItemByPosition
Uncheck
WaitForCreate
ElementMethods
GuiUserAreaHighlight
IsCreated
MouseClick
ScrollToNextPage
ScrollToPreviousPage
SendKeys
SetFocus
SetHorizontalScroll
SetVerticalScroll
WaitForCreate