SapGuiLogControlInformation Function

Action

This function logs the current control tree to the TrueLog. During load tests with TrueLog-On-Error enabled, it is recommended that you use the profile setting “Log control information on error” rather than “Log control information in TrueLog.” TrueLogs-On-Error will then only contain the control values of windows in which errors have been raised. To have additional control information included in TrueLogs-On-Error, use the following method to log the control information of the active window.

Include file

SapGui.bdh

Syntax

SapGuiLogControlInformation( ): boolean;

Return value

  • true if successful
  • false otherwise

Example

transaction TMain
  var
    sConnID : string;
  begin

    // Connecting to SAP
    sConnID := SapGuiOpenConnection(" /SAP_CODEPAGE=1100 /FULLMENU 10.5.2.198 0 /3");
    SapGuiSetActiveConnection(sConnID);    SapGuiSetActiveSession("ses[0]");

    // SAP
    SapGuiSetActiveWindow("wnd[0]", "SAP", SAPGUI_MATCH_Exact);
    SapGuiWindowAction(SAPGUI_WND_MAXIMIZE);

    // ensures that – in case of an error – the control tree of the logon screen is included in the TrueLog
    SapGuiLogControlInformation();

    // Logon to SAP System

    // Before running a test you must customize the password parameter!
    SapGuiIgnoreError(SAPENGINE_STATUSBAR_CHANGED, SEVERITY_SUCCESS);
    ThinkTime(2.8);
    SapGuiLogon("ddic", "minisap", "000", "");
 
    // SAP Easy Access
    ThinkTime(9.9);
    SapGuiSetActiveWindow("wnd[0]", "SAP Easy Access", SAPGUI_MATCH_Exact);
  end TMain;