Purpose
Use the built-in functions of the native control interface for handling special screens

guixt.windowSendKeys
Sends keyboard strokes to the SAP GUI window or another window

CallVBAsync guinet.guixt.windowSendKeys

Parameters

1 keys
String to be sent to the window. Various special keys are possible, see below.

2 hwnd    Default: 0
Window handle. If 0, the SAP GUI main window of the current mode is used.


Example:
CallVBAsync guinet.guixt.windowSendKeys "{TAB}{ENTER}"

All features of the Windows "SendKeys" function can be used. For example, you can send characters and function keys. See

https://learn.microsoft.com/en-us/office/vba/language/reference/user-interface-help/sendkeys-statementkeys-statement

for a detailed description.

In addition, GuiXT provides the following commands:

{POPUP} waits for the next popup screen and then sends the next keys

{CLICK} sends a left mouse click

{DOUBLECLICK} sends a left doubleclick

A common example is the native file save dialog that is used in some  SAP transactions. It cannot be handled directly in an InputScript since it is not an SAP screen but a native Windows screen.

Example

The following InputScript calls up transaction PRCR in order to download travel expenses configuration data to a local file:

Enter "/nPRCR"

// Travel Expenses Per Diems: Download to File

Screen RPR_CREATE_PER_DIEMS_FILE.1000

  Set R[Table T7060: Trip Areas]   "X"

  Enter "=TAB"

 

// Travel Expenses Per Diems: Download to File

Screen RPR_CREATE_PER_DIEMS_FILE.1000

  Set F[Trip Provision Variant]   "01"

  Set F[Language Key]   "EN"

 

  // fixed file name, or specified by user via SelectFile

  Set V[filename]  "F:\temp\travel_config.01.txt"

  // Enter file name on next popup

  // confirm overwriting an existing file if a second popup appears

  CallVB guinet.guixt.windowSendKeys _

    "{POPUP}&V[filename]{ENTER}{POPUP}{TAB}{ENTER}"

 

  Enter "/8" 

 

Screen SAPLKKBL.0120

  Enter "/n"     

   

Components
InputAssistant + Controls