SAPGUI scripting resources

Hate manual data entry work? How about a typing in a few hundred line items in purchase orders with descriptions like "BOWMA-TORQ HX HD CAP SCR 1/2-13X1-1/2"? If the items do not exist as material numbers, you have no choice but to type their description by hand. . .unless you automate it with a SAPGUI script. Veteran Basis guru Giovanni Davila walks you through the process in this step-by-step guide.

As you have seen, SAPGUI scripting is a good automation tool. Developers can use it with other tools and programming...

languages such as C++ to do more sophisticated tasks. I have personally used it to do a lot of administrative tasks. There are, of course, ways to fully create purchase orders in SAP but they require more work and a deeper knowledge of purchasing.

You can turn off the notification that says, "A script is trying to attach to the GUI". To do so, click on the Customizing icon, select Options and click the Scripting tab. Then, uncheck the box that says, 'Notify When a Script Attaches to a Running GUI'.

You can add additional commands to your VBS script. For example, you can add a last statement to save the purchase order once the data has been entered.

Last, but not least, you can learn more about SAPGUI scripting at the SAP Marketplace (

More resources:
SAP Marketplace
SAPGUI Scripting at the MarketPlace (requires OSS user ID).
ABAP Programming

Also check out:
Giovanni's answers to commonly asked Basis questions's comprehensive Basis Learning Guide

SAP Notes:
#480149 New profile parameter for user scripting at the front end
#612454 SAP GUI Scripting: Status and Lifetime
#527737 Composite SAP Note on SapGui scripting


 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

Giovanni Davila, technical author and SAP Basis expert
Giovanni Davila is an expert in SAP administration on the Windows platform. He has authored the critically-acclaimed books "SAP Basis Administration" and "SAP Basis Administration for Windows". He also wrote an article for the SAP Professional Journal titled "System Database Copies – Made Easy".
Copyright 2005 TechTarget

Dig Deeper on SAPscript and Smart Forms

Join the conversation

1 comment

Send me notifications when other members comment.

Please create a username to comment.

how can i automate different tenants in sap here i may have different tenants like prd,prm,pro, .wt my question is i have prepared a code for prd after fletching data from sap to excel next i need to automate prm in this we have different codes like 652,654,656, so after finishing prd next should go to sap login page and give manually every prm sub codes is that possible to automate that through vba if so please let me know how to do
thank you