Review the generated code

The generated VBScript code is shown in the following image.

Screenshot of VBScript code generated by the recording.

Screenshot showing the following VBScript: If Not IsObject application Then Set SapGuiAuto GetObject quot SAPGUI quot Set application SapGuiAuto GetScriptingEngine End If If Not IsObject connection Then Set connection application Children 0 End If If Not IsObject session Then Set session connection Children 0 End If If IsObject WScript Then WScript ConnectObject session quot on quot WScript ConnectObject application quot on quot End If session findById quot wnd 0 quot maximize session findById quot wnd 0 tbar 0 okcd quot text quot PA30 quot session findById quot wnd 0 quot sendVKey 0 session findById quot wnd 0 usr ctxtRP50G PERNR quot text quot.

The following image shows the anatomy of an SAP GUI automation script.

Screenshot of the VBScript code marked up to show syntax.

Screenshot showing that the If Not and End If statements are all part of SAP GUI object model initialization.
session.findById is the GUI selector.
wnd[0] is the GuiFrameWindow.
/usr/ is the GuiUserArea.
txtP0006-STRAS is a GuiTextField.
.text = "My Street 13" sets the field value.