SAP Connector methods

  • リリースバージョン: Australia
  • 更新日 2026年03月12日
  • 所要時間:11分
  • 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.

    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.
    表 : 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.
    表 : 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.
    表 : 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.
    表 : 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.
    表 : 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.
    表 : 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 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.
    表 : 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.

    表 : 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.
    表 : 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.
    表 : 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.

    表 : 11. GuiButton methods
    Element Methods
    GuiButton Click
    Highlight
    IsCreated
    MouseClick
    SendKeys
    SetFocus
    WaitForCreate
    表 : 12. GuiCheckBox methods
    Element Methods
    GuiCheckBox Check
    Highlight
    IsChecked
    IsCreated
    SendKeys
    SetFocus
    Uncheck
    sap-element-methods.html#null__dlentry_a5s_qlk_q1c
    sap-element-methods.html#null__dlentry_lvb_5lk_q1c
    表 : 13. GuiComboBox methods
    Element Methods
    GuiComboBox sap-element-methods.html#null__dlentry_ufs_xgl_q1c
    sap-element-methods.html#null__dlentry_sqn_phl_q1c
    sap-element-methods.html#null__dlentry_as5_ygl_q1c
    sap-element-methods.html#null__dlentry_ks3_jlk_q1c
    sap-element-methods.html#null__dlentry_l11_llk_q1c
    sap-element-methods.html#null__dlentry_jnx_rjl_zdc
    sap-element-methods.html#null__dlentry_gcm_hhl_q1c
    sap-element-methods.html#null__dlentry_j5g_nlk_q1c
    sap-element-methods.html#null__dlentry_a5s_qlk_q1c
    sap-element-methods.html#null__dlentry_lvb_5lk_q1c
    表 : 14. GuiCtrlGridView methods
    Element Methods
    GuiCtrlGridView sap-element-methods.html#null__dlentry_jgp_njc_b2c
    sap-element-methods.html#null__dlentry_u1t_z3c_b2c
    sap-element-methods.html#null__dlentry_bkz_z3c_b2c
    sap-element-methods.html#null__dlentry_tlf_1jc_b2c
    sap-element-methods.html#null__dlentry_vdm_1jc_b2c
    sap-element-methods.html#null__dlentry_sns_1jc_b2c
    sap-element-methods.html#null__dlentry_pdz_1jc_b2c
    sap-element-methods.html#null__dlentry_c5g_bjc_b2c
    sap-element-methods.html#null__dlentry_dkr_bjc_b2c
    sap-element-methods.html#null__dlentry_o3z_bjc_b2c
    sap-element-methods.html#null__dlentry_g2g_cjc_b2c
    sap-element-methods.html#null__dlentry_m5n_cjc_b2c
    sap-element-methods.html#null__dlentry_sm5_cjc_b2c
    sap-element-methods.html#null__dlentry_vwb_djc_b2c
    sap-element-methods.html#null__dlentry_ks3_jlk_q1c
    sap-element-methods.html#null__dlentry_l11_llk_q1c
    sap-element-methods.html#null__dlentry_a5s_qlk_q1c
    sap-element-methods.html#null__dlentry_jnx_rjl_zdc
    sap-element-methods.html#null__dlentry_j5g_nlk_q1c
    sap-element-methods.html#null__dlentry_nfj_djc_b2c
    sap-element-methods.html#null__dlentry_mlv_djc_b2c
    sap-element-methods.html#null__dlentry_d52_2jc_b2c
    sap-element-methods.html#null__dlentry_cpl_2jc_b2c
    sap-element-methods.html#null__dlentry_zqs_2jc_b2c
    sap-element-methods.html#null__dlentry_unz_2jc_b2c
    sap-element-methods.html#null__dlentry_w1g_fjc_b2c
    sap-element-methods.html#null__dlentry_h14_fjc_b2c
    sap-element-methods.html#null__dlentry_cfv_fjc_b2c
    sap-element-methods.html#null__dlentry_qxb_gjc_b2c
    sap-element-methods.html#null__dlentry_lvb_5lk_q1c
    表 : 15. GuiLabel methods
    Element Methods
    GuiLabel sap-element-methods.html#null__dlentry_ess_zzb_s1c
    sap-element-methods.html#null__dlentry_ks3_jlk_q1c
    sap-element-methods.html#null__dlentry_l11_llk_q1c
    sap-element-methods.html#null__dlentry_a5s_qlk_q1c
    sap-element-methods.html#null__dlentry_jnx_rjl_zdc
    sap-element-methods.html#null__dlentry_j5g_nlk_q1c
    sap-element-methods.html#null__dlentry_lvb_5lk_q1c
    表 : 16. GuiPassword methods
    Element Methods
    GuiPassword sap-element-methods.html#null__dlentry_ks3_jlk_q1c
    sap-element-methods.html#null__dlentry_l11_llk_q1c
    sap-element-methods.html#null__dlentry_jnx_rjl_zdc
    sap-element-methods.html#null__dlentry_k53_c1c_s1c
    sap-element-methods.html#null__dlentry_j5g_nlk_q1c
    sap-element-methods.html#null__dlentry_mwk_b1c_s1c
    sap-element-methods.html#null__dlentry_a5s_qlk_q1c
    sap-element-methods.html#null__dlentry_lvb_5lk_q1c
    表 : 17. GuiRadioButton methods
    Element Methods
    GuiRadioButton sap-element-methods.html#null__dlentry_ks3_jlk_q1c
    sap-element-methods.html#null__dlentry_nhz_grc_s1c
    sap-element-methods.html#null__dlentry_l11_llk_q1c
    sap-element-methods.html#null__dlentry_f5z_pqc_s1c
    sap-element-methods.html#null__dlentry_jnx_rjl_zdc
    sap-element-methods.html#null__dlentry_j5g_nlk_q1c
    sap-element-methods.html#null__dlentry_a5s_qlk_q1c
    sap-element-methods.html#null__dlentry_lvb_5lk_q1c
    表 : 18. GuiStatusBar methods
    Element Methods
    GuiStatusBar sap-element-methods.html#null__dlentry_hmv_glk_q1c
    sap-element-methods.html#null__dlentry_ks3_jlk_q1c
    sap-element-methods.html#null__dlentry_l11_llk_q1c
    sap-element-methods.html#null__dlentry_a5s_qlk_q1c
    sap-element-methods.html#null__dlentry_jnx_rjl_zdc
    sap-element-methods.html#null__dlentry_j5g_nlk_q1c
    sap-element-methods.html#null__dlentry_lvb_5lk_q1c
    表 : 19. GuiTab methods
    Element Methods
    GuiTab sap-element-methods.html#null__dlentry_ks3_jlk_q1c
    sap-element-methods.html#null__dlentry_l11_llk_q1c
    sap-element-methods.html#null__dlentry_orm_thd_s1c
    sap-element-methods.html#null__dlentry_jnx_rjl_zdc
    sap-element-methods.html#null__dlentry_j5g_nlk_q1c
    sap-element-methods.html#null__dlentry_a5s_qlk_q1c
    sap-element-methods.html#null__dlentry_lvb_5lk_q1c
    表 : 20. GuiTableControl methods
    Element Methods
    GuiTableControl sap-element-methods.html#null__dlentry_gzn_rvs_q1c
    sap-element-methods.html#null__dlentry_nbh_5vs_q1c
    sap-element-methods.html#null__dlentry_zm1_tvs_q1c
    sap-element-methods.html#null__dlentry_a33_1ws_q1c
    sap-element-methods.html#null__dlentry_h4m_fws_q1c
    sap-element-methods.html#null__dlentry_qbs_mws_q1c
    sap-element-methods.html#null__dlentry_str_rys_q1c
    sap-element-methods.html#null__dlentry_kdv_gws_q1c
    sap-element-methods.html#null__dlentry_hsp_kws_q1c
    sap-element-methods.html#null__dlentry_zg5_cws_q1c
    sap-element-methods.html#null__dlentry_ks3_jlk_q1c
    sap-element-methods.html#null__dlentry_l11_llk_q1c
    sap-element-methods.html#null__dlentry_a5s_qlk_q1c
    sap-element-methods.html#null__dlentry_ojz_1zs_q1c
    sap-element-methods.html#null__dlentry_f3x_bzs_q1c
    sap-element-methods.html#null__dlentry_wm1_5gw_12c
    sap-element-methods.html#null__dlentry_xm1_5gw_12c
    sap-element-methods.html#null__dlentry_lqf_dzs_q1c
    sap-element-methods.html#null__dlentry_gcb_zys_q1c
    sap-element-methods.html#null__dlentry_cnl_pvs_q1c
    sap-element-methods.html#null__dlentry_gq5_xqs_q1c
    sap-element-methods.html#null__dlentry_d2y_mvs_q1c
    sap-element-methods.html#null__dlentry_jnx_rjl_zdc
    sap-element-methods.html#null__dlentry_j5g_nlk_q1c
    sap-element-methods.html#null__dlentry_lvb_5lk_q1c
    表 : 21. GuiTextBox methods
    Element Methods
    GuiTextBox sap-element-methods.html#null__dlentry_ess_zzb_s1c
    sap-element-methods.html#null__dlentry_ks3_jlk_q1c
    sap-element-methods.html#null__dlentry_l11_llk_q1c
    sap-element-methods.html#null__dlentry_jnx_rjl_zdc
    sap-element-methods.html#null__dlentry_k53_c1c_s1c
    sap-element-methods.html#null__dlentry_j5g_nlk_q1c
    sap-element-methods.html#null__dlentry_mwk_b1c_s1c
    sap-element-methods.html#null__dlentry_a5s_qlk_q1c
    sap-element-methods.html#null__dlentry_lvb_5lk_q1c
    表 : 22. GuiTree methods
    Element Methods
    GuiTree sap-element-methods.html#null__dlentry_yqk_2rw_12c
    sap-element-methods.html#null__dlentry_hdq_bqw_12c
    sap-element-methods.html#null__dlentry_epf_4mf_b2c
    sap-element-methods.html#null__dlentry_nhq_prw_12c
    sap-element-methods.html#null__dlentry_kfj_trw_12c
    sap-element-methods.html#null__dlentry_ad3_bqw_12c
    sap-element-methods.html#null__dlentry_ggf_1qw_12c
    sap-element-methods.html#null__dlentry_dtx_bqw_12c
    sap-element-methods.html#null__dlentry_crf_cqw_12c
    sap-element-methods.html#null__dlentry_vqn_cqw_12c
    sap-element-methods.html#null__dlentry_unv_cqw_12c
    sap-element-methods.html#null__dlentry_jbw_25w_12c
    sap-element-methods.html#null__dlentry_ks3_jlk_q1c
    sap-element-methods.html#null__dlentry_l11_llk_q1c
    sap-element-methods.html#null__dlentry_ff4_xxw_12c
    sap-element-methods.html#null__dlentry_orm_thd_s1c
    sap-element-methods.html#null__dlentry_jnx_rjl_zdc
    sap-element-methods.html#null__dlentry_j5g_nlk_q1c
    sap-element-methods.html#null__dlentry_a5s_qlk_q1c
    sap-element-methods.html#null__dlentry_ubf_2yw_12c
    sap-element-methods.html#null__dlentry_z3g_mnf_b2c
    sap-element-methods.html#null__dlentry_gqd_dqw_12c
    sap-element-methods.html#null__dlentry_iyr_dqw_12c
    sap-element-methods.html#null__dlentry_ehb_2qw_12c
    sap-element-methods.html#null__dlentry_cdy_hrw_12c
    sap-element-methods.html#null__dlentry_lvb_5lk_q1c
    表 : 23. GuiUserArea methods
    Element Methods
    GuiUserArea sap-element-methods.html#null__dlentry_ks3_jlk_q1c
    sap-element-methods.html#null__dlentry_l11_llk_q1c
    sap-element-methods.html#null__dlentry_a5s_qlk_q1c
    sap-element-methods.html#null__dlentry_h53_znw_12c
    sap-element-methods.html#null__dlentry_x2t_znw_12c
    sap-element-methods.html#null__dlentry_jnx_rjl_zdc
    sap-element-methods.html#null__dlentry_j5g_nlk_q1c
    sap-element-methods.html#null__dlentry_vh1_cdl_q1c
    sap-element-methods.html#null__dlentry_gsv_4dl_q1c
    sap-element-methods.html#null__dlentry_lvb_5lk_q1c