SAP Transaction
Opens an SAP task according to the defined transaction code.
Command availability: IBM RPA SaaS and IBM RPA on premises
Script syntax
IBM RPA's proprietary script language has a syntax similar to other programming languages. The script syntax defines the command's syntax in the script file. You can work with this syntax in IBM RPA Studio's Script mode.
sapTransaction --transactionCode(String)
Dependencies
- The environment needs to have the SAP® software.
- Need some SAP instance active
Input parameter
The following table displays the list of input parameters available in this command. In the table, you can see the parameter name when working in IBM RPA Studio's Script mode and its Designer mode equivalent label.
Designer mode label | Script mode name | Required | Accepted variable types | Description |
---|---|---|---|---|
Task Transaction Code | transactionCode |
Required |
Text |
Transaction code of the task that should be opened. |
Example
Starts a new SAP session, closes this session, and logs a message into IBM RPA Studio console with the result of closes attempt.
The command opens the task for a defined SAP transaction.
defVar --name applicationWindow --type Window
defVar --name applicationId --type Numeric
defVar --name startSuccess --type Boolean
// Opens the informed SAP application, with the user name, password and customer id in English.
startSAPSession --applicationpath "SAP application path" --connectionstring "Connection String" --clientid 001 --username username --password password --language en applicationWindow=value applicationId=processId startSuccess=success
logMessage --message "${startSuccess}" --type "Info"
// Returns a Boolean variable, indicating successful initialization.
// Opens the informed SAP transaction.
sapTransaction --transactionCode "Transaction Code"
// The script is just an example with information on how to use the command.