DevOps Automation

 View Only

UrbanCode for SAP

By Osman Burucu posted Mon August 01, 2022 08:30 AM


This article was originaly published in 2018.02.22

UrbanCode for SAP

Managing deployments, updates, and configuration changes to SAP environments can be a time-consuming and challenging task. The process often involves many users across many roles coordinating via emails, spreadsheets, and service management tools. Having a well-established process in place that can automate the deployment and management of these changes is crucial for every organization. UrbanCode delivers a full-scale solution for the automation and management of SAP, through its market-leading approach to Application Release Automation at enterprise scale. It's important to note that SAP environments vary widely across different implementations and lines of businesses. This article can be used as a foundation for setting up orchestration with UrbanCode, but will also require customizations and built-upon strategies to best fit the needs of the user.


Managing SAP with UrbanCode

One of the biggest advantages of using UrbanCode Deploy is it's ability to manage processes, roles, approvals, and provide visibility into the entire deployment processes. For automation capabilities with SAP, jump below to the automation section of this post.


For setting up SAP deployments in UrbanCode Deploy, start with installing agents on each of the source and target systems which will be deployed to. This can be designed in the Resources tab, by creating a top level resource and resource tree. A very basic SAP single stack resource tree might look something like this:

Example resource tree for SAP ABAP stack deployment

Example resource tree for SAP ABAP stack deployment

In the resource tree shown above, three agents have been installed on three different servers, representing the DEV, QA, and Production environments for the ABAP stack. This resource configuration would likely be used for deploying transport requests across environments using CTS. A similar resource configuration might exist for the environments for Process Orchestration (PO), Java stacks, or environments dedicated to SAP System Copy.


UrbanCode Deploy offers several ways to handle deployment approvals. One option is to create Manual Task steps within a process workflow to notify a role member that their approval is needed. For example, during an SAP transport deployment, notifying the SAP Admin that a deployment is occurring might be necessary. This manual task could also notify the SAP admin to perform other necessary duties related to the deployment. The process workflow for this type of approval might looking something like this:

Example approval step in process workflow

Approvals and approval processes can also be set up for individual environments. This makes deployment to a specific environment require the approval of the environment admin, or whoever is responsible for changes at that location.

Example of an environment requiring approvals to deploy

Once this box is checked, an approval process can be set up for how to handle the approval.

Example environment approval process

Release Management

UrbanCode Deploy can help organize and handle approvals for the management of SAP Application Releases. However, when the number of applications and complexity of releases begins to grow and require more roles, more approvals, and more tasks, a higher level few of the whole release process might become necessary. This is where UrbanCode Release comes into play. UrbanCode Release provides a holistic view of Environments, and how to manage the release of many applications at one time as part of a release cycle. For more information about complex release management, refer to the UrbanCode Release Documentation.

Automating SAP

For routine and repeatable processes in SAP, such as the deployment of transport requests, there is a need for automation to eliminate the time-consuming and repetitive tasks of exporting and importing. SAP provides a variety of APIs that can assist with this. Various third party robotic tools (such as Rational Functional Tester) can also be called by UrbanCode steps to automate the tasks that don't offer APIs or command-line driven options.

CTS Plug-in

The SAP-CTS plugin for UrbanCode leverages the SAP Transport Control Program (tp) command-line, a utility for controlling transports between SAP systems. This operation is useful for the deployment of ABAP stacks in SAP. For CTS+ users, it could be an option for transporting change requests across Java stacks as well. To use the CTS plugin, a list of transport requests to import to an SAP environment needs to be provided. There are many ways to provide this. In many cases, this list is sent by developers via email to their SAP administrators, who order the list and perform the imports manually. For UrbanCode to be most effective, it should be able to get this list directly from the SAP administrator or whichever role handles the import. This could mean an automated build task or process which pushes the list to the UrbanCode component, or simply placing the list in a source control system, where it can be polled and versioned within the UrbanCode component. Regardless of how you choose to compile and handle this list, the UrbanCode process needs it to perform the import. Once of the list is in UrbanCode and versioned on the component, it can be found here:

Example component version with a transport list to be imported to SAP

A typical deployment process for these transport requests might look something like this:

Component process showing SAP-CTS plug-in steps

In the above process, the 'Download Artifacts' step is used to download a file containing the list of transport requests to pass to the SAP-CTS plugin steps. The order the transport requests are given in the file determine the order by which they are added to the buffer and imported to the SAP system. The CTS plug-in can also handle the list directly (not via file). This is defined within the step itself within the component process. Remember that the agent running the deployment process should be installed on the target SAP system.

Robotic Automation

Within SAP, applets and user interfaces require configuration updates that may not have a simple back end API to be leveraged for automation. For these scenarios, several robotic automation tools exist which can be used to drive automation on the host SAP machine. One example of this would be to use the Rational Functional Tester plugin with UrbanCode Deploy. An RFT script can be designed to operate on the SAP landscape, to click through a routine project, and the script can be called via an UrbanCode Deploy step as part of a process. For more information, refer to the documentation on integrating with Rational Test Workbench. Robotic automation makes it much easier to handle use-cases for automating SAP changes that don't have simple APIs or command lines available. A scenario where this is particularly useful is in deploying design and configuration objects as part of SAP Process Orchestration (PO). Importing and exporting the design and configuration objects is done by copying .tgz files into the target system import directory. For design objects, this means the Enterprise Services Repository (ESR) ${p:sap.systemDir}\xi\repository_server\import For configuration objects, this means the Integration Directory (ID) ${p:sap.systemDir}\xi\directory_server\import UrbanCode can automate this by moving the files at deployment time from the export directory of the lower environment (DEV) or any other source directory, to the import directory of the higher environment (QA). The first step would be copying the files into the folder. From here, the import must be applied in the applet UI. Using RFT, we can design an automation robot to perform the necessary steps to perform this action in the UI, and call this script from within the UrbanCode process. The following process shows how this deployment process might look. First we download the .tgz files from some source, we then copy them to the ESR or ID directory (depending if they are design or config objects). Finally, we run the robot script to apply the changes.

Example process for import design objects and applying the changes

The Shell script titled 'Import Design Objects' in this case would be a reference to a script or .bat file, which is called by Rational Functional Tester, to perform the robotic automation of applying the imports to SAP.

Script to call robotic automation

Deploying to SAP Cloud Platform

UrbanCode Deploy can also be used to deploy applications and multi-target applications to SAP Cloud Platform. This can be done via shell scripts using the SAP Cloud Platform Console Client. A shell script containing the following syntax could be incorporated into a component process for deployment purposes: neo deploy-mta --host ${sap.hostname} --account ${sap.account} --source ${filename},${filename2},...,${filename[n]} --user ${} Thus, a process to Deploy to HANA would look something like this:

Example of SAP Cloud Platform deployment process

To view all of the SAP Cloud Platform commands available to UrbanCode Deploy via shell scripts, refer to this link.

Other SAP Command-Line Utilities

SAP provides several command-line utilities for NetWeaver Development Infrastructure (NWDI) which UrbanCode can use to automate tasks in their respective platforms. These tools include:

  • CBS Command Line Tool - Component Build Service (CBS)
  • CMS Command Line Tool - Change Management Service (CMS)
  • DC Command Line Tool - Development Components (DCs)
  • DTR Command Line Tool - Design Time Repository (DTR)

Documentation for installing and running the command-line components can be found on SAP's website, SAP documentation. Once installed and made accessible to an UrbanCode Deploy agent, these tools can be used to fulfill the automation pipeline within UrbanCode Deploy.


There are many ways to govern the release of applications and configuration changes to SAP environments. UrbanCode has proven itself as among the best tools in the industry for this kind of deployment and release management. It also provides a powerful approach for automation, which can operate directly in all types of SAP environments. Every SAP implementation is different and has many different processes. For organizations looking for better management, better visibility, and better governance, and cut the time it takes to get changes into production, UrbanCode is a solution for you.