Checklist

Step 5: Analyze the VBS script

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:
session.findById("wnd[0]").resizeWorkingPane 149,32,false

I recommend you change it to maximize the screen. That is, use this statement instead: session.findById("wnd[0]").maximize

Take note of the positions used to enter the data into each field and the scrolling that takes place.


VBS Script.


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

 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

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: