Example: sapgui_set_text

The first example uses sapgui_set_text to enter the user name on the logon window. To record this step during logon as shown in the example, show operations on logon windows To record detail steps during logon clear Hide operations on logon windows: Choose Tools > Recording Options > SAPGUI > Code generation.

sapgui_set_text("User", 
    "MyUserName", 
    "usr/txtRSYST-BNAME", 
    BEGIN_OPTIONAL, 
        "AdditionalInfo=sapgui1004", 
    END_OPTIONAL);
The second example shows the use of sapgui_set_text to emulate dropping a file in a text edit control.
sapgui_set_text("", 
    "file=s201801.arg", 
    "usr/cntlSRC/shellcont/shell", 
    LAST );