Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member732133
Participant
The execute command activity allows you to launch commands or application during your workflow.

The Execute Command activity


The activity perform a ctx.shellexec and takes the following parameters:

  • command

  • parameters (optional)

  • dir (optional)

  • flag (optional)


With this activity we can start commands that will be started like a command line in the command run program that you can start with WIN + R on windows.


Here we write the string “Hello World” using the command “echo” into an output file

The activity also allows you to execute commands and launch application, for example you can start a script python as you can see in the following example.


Here we use the activity to launch a python script from a powerShell and redirect the output in a file.

Conclusion


With this activity, you can launch application or execute command in the workflow. To retrieve the output, of the activity, you can redirect the output to a file and read this file next.