Skip to Content

BI Process Chains with Dynamic System Command

For those of you who have had to manage the system commands in process chains, hopefully you’ll appreciate this little tip.  Here is the scenario…

You need a remote file to process/execute (.cmd/.exe) inside a process chain.  This remote file resides on a file server, not the application server.  The issue is when you create the command, you only have a free text field input box to define your command. Like the one below.

So you resolve yourself to put in the UNC path to the \\server\path\ to get it to work.  Here’s the kicker, if your environment is like most, you have different file servers for each tier of your landscape….so when you transport this process chain through the landscape, you have to go in and manually update the path to the file in the Q/A and Production tiers.  This is problematic on many different levels…so here is my solution.

Create a System Parameter with a value to the server name and use that parameter in the command string.  Pretty simple, how do you do it?

Locate the profile file on the application server and add an entry. You can find the file here:


Here is an example from my file where we added the parameter INTERFACESERVER = whatever your serverName is.  Before this parameter is available, the system has to be bounced.  If you don’t have access to this file, have your Basis folks help you out.  Do this in each system in your landscape.

Now that the parameter is available, we can create/edit existing commands to utilize this parameter.  Now when you transport this command through the landscape, the servername will resolve to whatever is set in this file. Pretty cool.

Lets create the command: Run  TCode SM69, and click the create ICON:

Fill in the Command name and in the opperating system command field, use the parameter you created in the profile.  Wrap the parameter in $/ / like this below:

You can see the list of available commands and your new one sorted alphebetically in SM69: 


Notice the difference between the commands above and below and my new one…the server path is “hard codded” in the string in the other two.  Now I can go edit my older commands and update them to the new parameter. 

Now you’re ready to add this new command to a process chain. Pull up the process chain you want to add the command to, either via RSA1 or RSPC transaction codes.

Drad the command object into the process chain designer:

You’ll see this prompt, click the create ICON:

Create you’re variant:

Now choose the command you created ealier:

Finally, your process chain can be connected to include this new command:


Congratulations, you’ve just created a new parameter and used it in a command, and put that command into a process chain.  How cool was that!!!

You must be Logged on to comment or reply to a post.
  • Ryan,

    I have the following scenario:

    I have a process chain where I need the      
    Specific step run in Central instance, my question is: I can use the command system for this?

    Gil Borges

    • Hi Gil,

      If I understand your question correctly, and you are referring to the application server, there is and SAP delivered parameter SAPDBHOST that will resolve to the name of the app server.  Just remember to wrap the parameter in $/ / like this:

      Hope that helps.

  • Hi Ryan,

    Could you please elaborate the scenario please and mention in what scenario this will be more useful to use to reduce the manual intervention.

    Thanks in advance...

    • I can try...
      Imagine you are building this process chain in the Development environment for transport through the landscape (I know it's tough), and this process chain needs to execute a command file that is located on a development file server.  If you hard code the path to the file in system command, once you transport the process chain to your Q/A and Production system you will be forced to change the system command in the subsequent systems to point to their prospective file server.
      Development file server MDSAP00
      Q/A file server MQSAP00
      Prod file server MPSAP00

      If the parameter in system command contains the path to the dev file server...
      \\mdsap00\folder1\folder2\ and you transport this system command in the process chain, and you run that process chain in Q/A and Production without updating the path, the systems will run the file on the DEVELOPMENT server. 
      To get the file on the Q/A box to run, you will have to manually update the command parameter to point to the Q/A file server \\mqsap00\ect...

      If your organization is like mine and periodically does a "Refresh" of the Q/A system (replace with a copy of production setup and data) then the Q/A box now has system commands that point to the Production file server.  NOW you have to touch each and EVERY command to point it back to the Q/A file server. 

      Talk about pain in the arse.

      Fix: replace the sever name with a variable that resolves to the server applicable to each environment.

      Hope that clears up the scenario.

  • I hope you can help me.  I have created an external command.  We are on Windows NT.  I have entered the following values:

    Operating system command
    cmd /c

    Parameters for operating system command
    del "K:\testdir\employee data.csv"

    After I execute the command, I execute transaction AL11 and the file is deleted but when I look directly on the mapped network drive, the file is still there and it is locked up until we delete it manually and reload it.

    Any ideas why it is not really deleted but disappears from AL11.