The fastest way to start is to record yourself. SAP writes a VBScript file of every action.
Record
In SAP, Customize Local Layout (Alt+F12) › Script Recording and Playback.
Check the save path (More button), then click the red Record button.
Do the task: enter a transaction, fill the selection screen, execute.
Click Stop.
Replay
Back in the same dialog, choose the file and click Playback, or double-click the .vbs file with SAP open.
💡 Record a clean run: start from the SAP Easy Access screen, type the transaction with /n, don’t click around unnecessarily, and use the keyboard (Enter, F8). Fewer recorded steps = fewer things to break.
Where people go wrong
Problem
Cause
Recorder button greyed out
Scripting disabled on the server or client
Replay fails on another PC
Different screen layout or language; record with standard settings
Use SAP GUI scripting only where your company allows it, on a test/quality system first, and never to bypass authorisations. Examples use standard transactions and made-up data.
Practice
Record a simple read-only report run on a test system and compare it with the example file.
📎 Practice files for this article
📄
Lesson 2 scriptExample script with comments; adjust transaction fields to your system. Test in a non-production client.