When you run a Transaction script from the command line, you can pass Transaction solution commands as parameters.
To ensure that the log messages are saved, set the Excel save option to Save at end of run.
You can run a Transaction solution from the command line using this syntax:
"Automate.Studio.Console.exe full path" -SapTransaction -run"<Transaction solution name>" -lib"Txr lib" -tms"My App"
This command requires "Automate.Studio.Console.exe full path" to be enclosed in double quotes. In addition, ensure that there is a single space between "Transaction.exe full path" and "Transaction solution name with full path".
When you enter Transaction solution commands, separate each command using a space as the delimiter. The order in which you include these commands is not significant. If the Transaction solution command you specified does not exist in the Transaction solution you are using, the command is added at run-time.
Example 1: Note that this applies to solutions run locally.
"C:\Program Files\Automate\Studio\Automate.Studio.Console.exe" -SapTransaction -run"C:\MyDocuments\Automate\Studio\Script\Sample.TxR" -dsr"4" -der"6"
In this example, Transaction runs, opens Sample.TxR, reads the file, and then replaces or adds these commands to the file:
- -dsr starts from row 4 (ignores the Start Row value specified on the Studio Run tab).
- -der stops the run after three transactions (ignores the End Row value specified on the Studio Run tab).
Example 2: Note that this applies to solutions run from Evolve/Studio Manager.
“C:\Program Files\Automate\Studio\Automate.Studio.Console.exe" -SapTransaction -run"Sample" -rfn"C:\Users\msharma\Documents\Automate\Studio\Data\Sample.xlsx" -cnn"W6R Non Prod" -lib"Txr lib" -tms"Ms App" -dsr"2" -der"0" -rsn"Test Run reason" -eml"abc@aaa.com" -arf"True" -dsw"True" -irr"True"
In this example, Transaction runs, opens the application and library, opens the Sample solution, reads the file, and then replaces or adds these commands to the file:
- -lib for Evolve library where the script has been submitted
- -tms for referring to the Application/team space name
- -rfn is for the result data file name
- -cnn is the SAP connection name
- -dsr "2"starts from row 2 (ignores the Start Row value specified on the Studio Run tab)
- -der "0" stops the run at the end of the sheet (ignores the End Row value specified on the Studio Run tab)
- -rsn is the run reason
- -eml will send email notification to “abc@aaa.com”
- -arf set to “True” will attach copy of the processed data file to the email notification
- -dsw set to “True” will disable Production warning
- -irr set to “True” will require a run reason
Transaction runs the recording, using the parameters that are in the command line. All commands that run at the command prompt take precedence over the same commands that are already contained in the Transaction solution file.
You can test this command line operation by running this command in the Windows Run dialog box.
For best results, test these commands in a non-production system with a limited number of transactions before you run the Transaction solution from the command line.
Command reference
If email settings have not been added to the Evolve site and you specify the -eml (email) parameter in the command, you will receive a warning message.
Parameter |
Description |
Example |
---|---|---|
-drs | Set the run sheet |
-drs"SheetName" |
-cnn | SAP connection name | -cnn"W6R Non Prod" (used only with Evolve/Studio Manager, for Connect mode use -alf) |
-alf | SAP connection name | -alf"W6R Non Prod" (used only with Connect mode, for Evolve/Studio Manager use -cnn) |
-lib | Library name | -lib"Txr lib" |
-scn | SQL connection name | -scn”SQl1001” |
-tms | Teamspace name | -tms"Ms App" |
-arf |
Attach the data file with the posting results |
-arf"true" |
-dsw |
Disable the production server warning |
-dsw"true" |
-rfn |
Result file name |
-rfn"C:\Users\centraluser\Desktop\MM02.xlsx |
-eml |
Send notification email on schedule confirmation |
-eml"someone@winshuttle.com,someone@example.com" |
-irr |
If run reason is required or not |
-irr"true" |
-rsn |
Run reason |
-rsn"This is a demo run" |
-mod |
Recording mode for the script |
-mod"0" (0 = Batch, 1 = Non-Batch without controls, 2 = Non-Batch with controls, 3 = GUI Scripting) |
-dsr |
Start Row |
-dsr"5" |
-der |
End Row |
-der"10" |
-wel | Write extended log | -wel"true" |
-scd |
Save to Evolve |
-scd"true" |