Once you stop the recording a Visual Basic Script is created.
You can edit it in Notepad (or any other text editor).
Notice that the script has different sections:
1. A header.
2. Command lines with the data you entered.
3. Scroll lines.
If the SAPGUI screen was not maximized at the time of recording, you will see a line indicating the size. Example:
I recommend you change it to maximize the screen. That is, use this statement instead: session.findById("wnd").maximize
Take note of the positions used to enter the data into each field and the scrolling that takes place.
Line item data in VBS script.
More line item data in VBS script.
Scroll command lines in VBS script.
AUTOMATING LINE-ITEM DATA ENTRY VIA SAPGUI
Step 1: Setting the stage
Step 2: Activating SAPGUI scripting
Step 3: Preparing the input data file
Step 4: Recording the data entry
Step 5: Analyzing the VBS script
Step 6: Automating the VBS script creation
Step 7: Running the VBS script program generator
Step 8: Playing the VBS script to enter the line items
Step 9: Troubleshooting
Review: Conclusion and more resources