- The Automate Function Module is installed on your SAP system to enable optimized recording and execution.
- Users who will record, test, or run scripts are assigned the appropriate Studio licenses, including the Studio Administrator role.
- Use a non-production SAP environment with relevant test data to safely record and validate your scripts.
- Run an Authorization Check in Studio to confirm that all required SAP authorization objects are installed and the user has the necessary permissions to execute the transaction.
-
Always record and test your script in a non-production SAP system.
-
To achieve the best recording results, click only the SAP fields you want to include in the script. If necessary, practice a few times in SAP before you start to record in Studio.
-
Prepare your data in advance and avoid using F4 Lookup during recording. Using F4 Lookup while recording captures those calls in the script, causing them to execute every time a record runs. This can significantly degrade performance.
-
If you want to create a loop, be sure to type the first line item in the correct location for recording that t-code, and then click Insert Row, Create item, or Page down (depending on the t-code). It's good to record two line items, so that you can see the repeatable pattern. Some t-codes, such as ME21N, require two line items, because the Filter function is not available until you complete the first line item.
Choose a creation method and log on to SAP
- Click the File tab, and then click New.
- Click Transaction, and click Create from SAP recording.
- On the Studio logon screen, do one of the following:
- The first time that you use Automate Studio, choose your SAP system and type your client number, user name, and password in the box that opens.
- Click the SAP system box, click the SAP system you want to log onto, and type your password.
- Click Advanced SAP Logon. In the SAP Shuttle Logon box, choose your SAP system, and then type your client number, user name, and password.
For more information on Group Logon, message server logon, and other options, see Add SAP system.
Note: To save your credentials for future sessions, check the Save as auto logon credential box and type a name for the credentials in the Auto logon name box. The next time you log on to SAP from Studio, you will see your auto logon name in the SAP system box and your other credentials. All you have to do is click the Log on to SAP button. - Click Log On to SAP.
Record the script
- In the Transaction code box, type the t-code you want to use to upload data to SAP.
- If you want to record the script in Batch Input mode, Non-Batch Input mode
(with or without controls), or GUI Scripting mode, click Change, click the
mode you want, and then click OK.
The mode options depend on whether you are using Automate Function Module (AFM). If AFM is installed on the SAP system, the default mode is Standard, and AFM selects the optimum mode for the t-code that is being recorded. If AFM is not installed, the default mode is Non-Batch Input Mode without SAP controls.
For more information, see Recording modes.
- In the Data type box, choose the type of data file you want to use. The options are: Excel worksheet or Access database.
- To use an existing data file for your script, check the I have an existing data
file box, and then click the folder icon next to the Data file box and browse
to the file that you want to use.Note:
If the data file contains any PivotTables, 3-D charts, or custom XML, the file will open in read-only mode. To keep PivotTables and other elements in the file, open it in Excel and run it in Background Mode.
Password-protected files and .xlsb files are not supported.
Note: If you are using Access as the data type, choose an existing Access database for best results. - To automatically map the fields to the data file, check the Auto map when recording is finished box.
- Click Start Recording.
- In the SAP Console, enter values in the fields that you want to include in the script.Note:
Do not use F4 Lookup while recording.
When selecting views, use the view selector button instead of the tabs.
To stop the recording without finishing the script, click Discard Recording.
- When you have finished entering data, click the SAP Save button.
For the next step, see Map the fields.
Record a transaction that includes a loop
If you are recording a transaction that includes multiple line items for one set of header fields, follow steps 1-7 above, and then do the following:
- Type information into the fields that will become the header, and then press Enter.
- Type in the information for one line item.
Where you type the first line item depends on the t-code. For example, if you record VA01, start on the second row of the grid. If you record FB50, start on the first row of the grid.
- Click the SAP Create Item or Insert Row button.
- Repeat steps 2-3 to enter the second line item. This creates a visible pattern that you can find in the Mapper. After you add the loop, you will disable the extra line item's rows in the Mapper.
You will add the loop when you map the fields.
Advanced recording features
Using Transaction with Virsa Firefighter or GRC
For troubleshooting specific situations, see Automate Support.