Purpose With CallVBSAsync you can asynchonously call a VBScript function from a GuiXT Script or InputScript.

Component "GuiXT Controls" is needed for this command.

In the 64-bit SAP GUI, CallVBS and CallVBSAsync are not automatically available because Microsoft does not provide a 64-bit version of the script control that GuiXT uses for VBScript execution. You can install alternatives such as "Tablacus Script Control 64" if needed. CallVBS / CallVBAsync will then work again without requiring any adjustments to the GuiXT profile or script. Alternatively, especially for new developments, use JavaScript (CallJS) or VB.NET/C# (CallVB).  

Example CallVBSAsync SetGridLayout

The VBScript function  "SetGridLayout" is called asynchronously when all elements of the SAP GUI window are created.

Format and Details

Syntax and semantics are identical with  CallVBS 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.

If the SAP GUI screen contains a "SAP Tree Control" or a "SAP Grid Control", you can use the predefined objects "SapTree" and  "SapGrid" and apply the SAP GUI scripting methods. The SAP GUI session object is predefined as is "SapSession". All these objects are allocated under the condition that SAP GUI scripting is active both on the server and at the frontend.

Components GuiXT + Controls