Purpose With CallVBAsync you can asynchonously call a VB function from a GuiXT Script or InputScript.

In the called function you can

  • use the function parameters (strings or objects)
  • return a string or an object (but not synchonously, i.e. the result is not available in the next script line)
  • read and write GuiXT variables and long text variables
  • display your own Windows.Forms dialog with form.ShowDialog()
  • call methods of an ActiveX control embedded in the SAP GUI screen with the Control command
  • use SAP GUI scripting via the guinet.dll interface

The .NET class library (dll) can be made available locally or centrally, e.g. in SAP Web Repository or SAP Mime Repository

Prerequisites:

  • Component "GuiXT Controls" is active
     
  • The folder  ".NET class libraries" (guixt.ini parameter VBDirectory) is specified in GuiXT profile. All options that are available for the script directories can be used, e.g.

    VBDirectory  SAPWR:ZGUIXTVB
     
  • The inteface library guinet.dll, contained in GuiXT setup, and your own class library are contained in the ".NET class libraries" folder.
     
Example CallVBAsync utilities.grid.setlayout "layout1"

The .NET class library "utilities.dll" is loaded from the  ".NET class libraries" folder specified in GuiXT profile, guixt.ini-Parameter VBDirectory. For each  SAP GUI mode a separate object of the given class "grid" is created. The function  "SetGridLayout" of this object is called asynchronously when all elements of the SAP GUI window are created.
 

Format and Details Syntax and semantics are identical with  CallVB with the exception that the call is not performed synchronously but later on after finishing the GuiXT script processing and after the creation of all screen elements by SAP GUI. Accessing objects and methods of SAP GUI scripting is possible in asynchronous VBScript call only, since they are not yet created at the time when the GuiXT script  - which may change the screen layout - is still running.
Components GuiXT + Controls