Since we are merely interested in the line-item data entry, follow these steps:
1. Run transaction ME21N.
2. Enter a Vendor number and press ENTER.
3. Enter the Purchasing Group under Header ->>Org. data (see snapshot).
4. Click Customizing of Local Layout (or press Alt+F12).
5. Choose Script Recording and Playback (see snapshot).
6. Enter a script filename and start recording (see snapshot).
7. Enter the line items and their corresponding account assignment.
8. Stop the recording.
Notice how the screen changes to show the Item Detail section. This makes less line items visible in the Item Overview section.
The user's screen and video resolution dictates the maximum number of visible line items during data entry. It can very from two to 11 sometimes. So, it's important to take into account what video resolution users have on their computers (e.g. 800x600, 1024x768, etc.).
Record enough items so that you need to scroll down and enter more data. This will help you find out the scrolling pattern SAPGUI scripting needs to use at the Item Detail section.
Purchase Order header section.
Script Recording and Playback.
Script Recording.
AUTOMATING LINE-ITEM DATA ENTRY VIA SAPGUI
Home: Introduction
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
This was first published in August 2005