SAP Connector methods
- UpdatedJul 31, 2025
- 5 minutes to read
- Zurich
- RPA Hub
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
- Application: You can find these methods when you double-click the SAP connector object. To access these methods, do the following steps:
- Add the SAP connector under the Global Objects in the Project Explorer pane.
For more information, see Configure the SAP connector.
- Double-click the SAP connector object.
The methods appear in the Object Explorer pane.
- Add the SAP connector under the Global Objects in the Project 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:
- Add one or more SAP application screens. To learn to configure, see Configure the SAP connector.
- 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:
- Add one or more SAP application screens. To learn to configure, see Configure the SAP connector.
- 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.
- 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.

Application-level methods
- OpenConnection
- Establishes a connection between the connector and the SAP application. You must first use this method before executing an automation.
Table 1. OpenConnection method parameters Parameter Description Data port entry type Data type Default value Mandatory? name Name of the connection. Data In String None Yes username User name for making the connection. Data In String None Yes password Password for making the connection. Data In String None Yes - SetDefaultSession
- Makes the selected session a
default session.
Table 2. SetDefaultSession method parameters Parameter Description Data port entry type Data type Default value Mandatory? sessionId Unique Id of the session that you want to set as default. Data In String None Yes - 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.
Table 3. ClickMenuItem method parameters Parameter Description Data port entry type Data type Default value Mandatory? menuId The ID of the menu that must be selected. Data In String None Yes - Close
- Closes the session of the SAP screen.
- CreateSession
- Creates a session of the SAP screen.
Table 4. CreateSession method parameters Parameter Description Data port entry type Data type Default value Mandatory? tCode Transaction code that enables you to access specific part of the SAP application. Data In String NA Yes Return Returns the Id of the session created. Data Out String NA NA - 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.
Table 5. GetMenuItem method parameters Parameter Description Data port entry type Data type Default value Mandatory? menuId ID of the menu item to get the name. Data In String None Yes Return Returns the name of the menu item Data Out String None NA - GetMenuItemsIdsByName
- Retrieves the ID of the menu that you specify by its name.
Table 6. GetMenuItemsIdsByName method parameters Parameter Description Data port entry type Data type Default value Mandatory? menuItemName Name of the menu item. Data Out List None NA - GetWindowHandle
- Returns the window handle of the SAP application screen.
- IsCreated
- Returns
trueif the session is created,falseif the session isn’t created. - IsSessionBusy
- Returns
trueif the session is busy, andfalseif 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.
Table 7. Resize method parameters Parameter Description Data port entry type Data type Default value Mandatory? xPos Position of the screen along the X-axis. Data In Integer None Yes yPos Position of the screen along the Y-axis. Data In Integer None Yes Width Width of the screen. Data In Integer None Yes Height Height of the screen. Data In Integer None Yes - 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.
Table 8. SendKeys method parameters Parameter Description Data port entry type Data type Default value Mandatory? Keys Keyboard strokes that you want to send to the SAP screen. Data In String NA Yes - StartTransaction
- Starts a transaction.
Table 9. StartTransaction method parameters Parameter Description Data port entry type Data type Default value Mandatory? tCode Transaction code that enables you to access specific part of the SAP application. Data In String NA Yes - 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.
Table 10. WaitForCreate method parameters Parameter Description Data port entry type Data type Default value Mandatory? timeoutInSeconds Duration after which the method times out. Data In Integer None Yes MatchAllChildren Option to indicate whether before loading the screen, the method matches all the captured children screens and elements with the screen. Data In Boolean False No
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.
| Element | Methods |
|---|---|
| GuiButton | Click |
| Highlight | |
| IsCreated | |
| MouseClick | |
| SendKeys | |
| SetFocus | |
| WaitForCreate |
| Element | Methods |
|---|---|
| GuiCheckBox | Check |
| Highlight | |
| IsChecked | |
| IsCreated | |
| SendKeys | |
| SetFocus | |
| Uncheck | |
| MouseClick | |
| WaitForCreate |
| Element | Methods |
|---|---|
| GuiComboBox | Get |
| GetIconName | |
| GetList | |
| Highlight | |
| IsCreated | |
| SendKeys | |
| Set | |
| SetFocus | |
| MouseClick | |
| WaitForCreate |
| Element | Methods |
|---|---|
| GuiLabel | GetText |
| Highlight | |
| IsCreated | |
| MouseClick | |
| SendKeys | |
| SetFocus | |
| WaitForCreate |
| Element | Methods |
|---|---|
| GuiPassword | Highlight |
| IsCreated | |
| SendKeys | |
| SetCaretPosition | |
| SetFocus | |
| SetText | |
| MouseClick | |
| WaitForCreate |
| Element | Methods |
|---|---|
| GuiRadioButton | Highlight |
| IsChecked | |
| IsCreated | |
| Select | |
| SendKeys | |
| SetFocus | |
| MouseClick | |
| WaitForCreate |
| Element | Methods |
|---|---|
| GuiStatusBar | GetStatus |
| Highlight | |
| IsCreated | |
| MouseClick | |
| SendKeys | |
| SetFocus | |
| WaitForCreate |
| Element | Methods |
|---|---|
| GuiTab | Highlight |
| IsCreated | |
| SelectTab | |
| SendKeys | |
| SetFocus | |
| MouseClick | |
| WaitForCreate |
| Element | Methods |
|---|---|
| GuiTextBox | GetText |
| Highlight | |
| IsCreated | |
| SendKeys | |
| SetCaretPosition | |
| SetFocus | |
| SetText | |
| MouseClick | |
| WaitForCreate |
| Element | Methods |
|---|---|
| GuiUserArea | Highlight |
| IsCreated | |
| MouseClick | |
| ScrollToNextPage | |
| ScrollToPreviousPage | |
| SendKeys | |
| SetFocus | |
| SetHorizontalScroll | |
| SetVerticalScroll | |
| WaitForCreate |