In the release 2302 of SAP BTP ABAP environment (available since February 2023) the integration with SAP Cloud Transport Management (cTMS) became available. This increases the coverage of unified transport processes within BTP to a new and important area.

In this blog post we will describe step by step how to set up this integration and how to use it. The landscape we are using consists of three ABAP instances (DEV, QA, PROD) which are mapped to three transport nodes in SAP Cloud Transport Management (see graphical overview below).

Landscape%20overview

Landscape overview

 

The communication between the two services is established via Communication Arrangements on the ABAP side and via a service instance and destinations on the cTMS side.

 

Prerequisites

  1. You have at least two instances of SAP BTP, ABAP environment. In our example we are using three.
  2. You have subscribed to SAP Cloud Transport Management. For more details see the corresponding documentation.
  3. You have the needed roles for the ABAP environment (SAP_BR_ADMINISTRATOR and SAP_BR_DEVELOPER)
  4. You have the needed roles for cTMS (Administrator or LandscapeOperator and TransportOperator). For more details see the corresponding documentation.
  5. You have the needed role to create a service instance and a service key in the BTP subaccount with the subscription to cTMS (role collection “Subaccount Administrator”). Alternatively you can reuse an already existing cTMS service key.

 

Setup

Service Instance for cTMS

cTMS%20service%20instance

cTMS service instance

 

In order to connect from the ABAP environment to Cloud Transport Management you need a service instance of cTMS. The access details for the instance are stored in a service key which also has to be created. Please follow the instructions in the SAP Documentation.

If you already have a cTMS service instance of plan type ‘standard‘ with a service key you do not need to create a new one, but can reuse the existing one.

The cTMS service key can be retrieved from the ‘Instances and Subscriptions’ view in the SAP BTP Cockpit. Search for an instance of type ‘Cloud Transport Management’ and click on the link in the ‘Credentials‘ column.

Access%20service%20key

Access service key

 

The service key should look like this:


Service key

 

From the service key we will need four entries (marked on the screenshot):

  • clientid
  • clientsecret
  • url
  • uri

 

Outbound Communication Arrangement SAP_COM_0599 in ABAP DEV

Outbound communication arrangement

 

We now will create an outbound communication arrangement which uses the cTMS service key we have just created. For this, in your development instance of the ABAP environment, click on the Communication Arrangements tile.

Start%20Communication%20Arrangements

Start Communication Arrangements

 

On the communication arrangements overview screen select ‘New‘.

Create%20new%20Communication%20Arrangement

Create new Communication Arrangement

 

Select the scenario SAP_COM_0599, choose an Arrangement Name and click on ‘Create‘.

Choose%20scenario%20SAP_COM_599

Choose scenario SAP_COM_0599

 

We will create the needed communication system on the fly: In the ‘Common Data‘ area click on the ‘New‘ button next to the ‘Communication System‘ field.

Create%20new%20Communication%20System

Create new Communication System

 

Choose a System ID for the communication system (only upper case letters and underscores are possible). The System Name can be identical. Click on ‘Create‘.

Communication%20System%20ID%20and%20Name

Communication System ID and Name

 

Open the Service Key of the Cloud Transport Management instance (created in the previous chapter) and copy the entry ‘uri‘ (without the leading https://) to the field ‘Host Name‘ in the area ‘General

Also copy the entry ‘url‘ (again without https://) to the field ‘Token Endpoint‘ in the area ‘OAuth 2.0 Settings‘.

Append ‘/oauth/token?grant_type=client_credentials‘ to the end of the URL.

URLs%20for%20Host%20Name%20and%20Token%20Endpoint

URLs for Host Name and Token Endpoint

 

Scroll down to the area ‘Users for Outbound Communication’ and click on the ‘+‘ (plus) icon.

Add%20outbound%20communication%20user

Add outbound communication user

 

Choose Authentication Method ‘OAuth 2.0’.

Copy the service key entry ‘clientid‘ to the field ‘OAuth 2.0 Client ID‘.

Copy the entry ‘clientsecret‘ to the field ‘Client Secret‘.

Click on ‘Create‘.

Enter%20clientid%20and%20clientsecret

Enter clientid and clientsecret

 

Click on ‘Save‘ to create the communication system.

Save%20Communication%20System

Save Communication System

 

The data from the Communication System is automatically taken over to the Communication Arrangement.

You have to provide a ‘CTMS Node Name‘ in the area ‘Additional Properties‘. This name has to be reused when creating transport nodes in cTMS. It will be the name of the entry (development) node in your transport landscape. Please note that the name will be converted to upper case letters when entering it.

Click on ‘Save‘ to create the Communication Arrangement.

Save%20communication%20arrangement

Save communication arrangement

 

The Communication Arrangement can now be used.

Communication arrangement ready

 

Please also check out the documentation.

 

Inbound Communication Arrangements SAP_COM_0510 in ABAP QA and PROD

Inbound communication arrangement

 

The next step is to create inbound Communication Arrangements for all ABAP instances into which you would like to import (deploy) cTMS transport requests. In our example this would be the QA and the PROD instance.

Open your ABAP QA instance and click on the ‘Communication Arrangements‘ tile.

Start%20Communication%20Arrangements

Start Communication Arrangements

 

Click on the ‘New‘ button.

New%20inbound%20communication%20arrangement

New inbound communication arrangement

 

Select the Scenario ‘SAP_COM_0510′, choose an Arrangement Name and click on ‘Create‘.

Choose%20scenario%20SAP_COM_0510

Choose scenario SAP_COM_0510

 

We will again create the needed communication system on the fly: In ‘Common Data‘ area click on the ‘New‘ button next to the ‘Communication System‘ field.

New%20inbound%20communication%20system

New inbound communication system

 

Choose a System ID for the communication system (only upper case letters and underscores are possible). The System Name can be identical. Click on ‘Create‘.

Name%20inbound%20communication%20system

Name inbound communication system

 

Select the checkbox ‘Inbound Only‘.

Set%20checkbox%20Inbound%20Only

Set checkbox Inbound Only

 

We will now create a technical communication user for the inbound communication. To do this, scroll down to the area ‘Users for Inbound Communication‘ and click on the ‘+‘ (plus) icon.

Add%20inbound%20communication%20user

Add inbound communication user

 

Click on ‘New User‘.

New%20inbound%20communication%20user

New inbound communication user

 

Enter a User Name, Description and Password. Store this information in a safe place, because it will be needed later to set up the destinations for cTMS.

The password has to have at least 20 characters so you might want to use the Propose Password functionality.

Click on ‘Create‘.

Set%20user%20name%20and%20password

Set user name and password

 

Confirm the user by clicking on ‘OK‘.

Conform%20user

Conform user

 

Click on ‘Save‘ to create the communication system.

Save%20inbound%20communication%20system

Save inbound communication system

 

The data from the Communication System is automatically taken over to the Communication Arrangement.

The Service URL in the line ‘Git Repository – Manage‘ will be used to set up the destination for cTMS.

Click on ‘Save‘ to create the communication arrangement.

You can ignore a warning referring to the ATC Check Run.

Save%20inbound%20communication%20arrangement

Save inbound communication arrangement

 

Go to your other ABAP instances which should become targets of imports and repeat these steps (potentially with other names for the created artifacts…). In our example we have to do it for the productive instance.

Please check out the documentation as well (Prerequisites section).

 

 

Destinations for cTMS import into QA and PROD

Destinations to target environments

 

We will now use the information from the inbound communication arrangements to create destinations pointing to the ABAP instances.

Go to the SAP BTP subaccount in which you subscribed to cTMS, open the Destinations tab and click on ‘New Destination‘.

Create%20new%20destination

Create new destination

 

Provide a meaningful name for the destination and switch the authentication to ‘Basic Authentication‘.

Destination%20settings

Destination settings

 

In a second browser tab open the inbound communication arrangement of scenario SAP_COM_510 for your ABAP QA instance.

Data%20from%20inbound%20communication%20arrangement

Data from inbound communication arrangement

 

From here copy the Service URL from the row Git Repository – Manage to the URL field in the destination.

Copy the User Name to the field User in the destination.

Provide the Password you have assigned to the communication user when creating the communication arrangement.

Click on ‘Save‘.

Provide%20URL%20user%20and%20password

Provide URL, user and password

 

Click on ‘Check Connection‘.

Check%20connection

Check connection

 

It should return ‘200: OK’

Connection%20check%20successful

Connection check successful

 

Now repeat these steps and create destinations for all SAP BTP ABAP instances which will become targets for cTMS imports. In our example this is one more destination for the productive instance.

Please also have a look at the documentation.

 

Transport nodes and routes

Transport nodes and routes

 

The final configuration step is the creation of your transport landscape consisting of transport nodes and routes.

For this enter the SAP BTP subaccount in which you subscribed to Cloud Transport Management, open the ‘Instances and Subscription‘ tab and click on ‘Cloud Transport Management‘ in the ‘Subscriptions‘ area.

Open%20Cloud%20Transport%20Management

Open Cloud Transport Management

 

This opens the Cloud Transport Management user interface. Click on ‘Transport Nodes‘ in the navigation pane.

Open%20transport%20nodes

Open transport nodes

 

Click on the ‘+‘ (plus) icon to create a new transport node.

Create%20new%20transport%20node

Create new transport node

 

Let’s start with the development node.

Provide a Name for the development node. It has to be identical (case sensitive) with the Additional Property ‘CTMS Node Name’ you provided when creating the outbound communication arrangement of scenario SAP_COM_0599 in your ABAP development instance.

Set the checkbox ‘Allow Upload to Node‘.

If you plan to use the transport node only to feed transport requests into your landscape (as a pure source node) you can leave the rest of the input fields on their default values, especially you don’t need a Content Type or a Destination.

Click on ‘OK‘ to create the node.

Development%20node

Development node

 

You might want to double-check your additional property setting in the outbound communication arrangement in your ABAP development instance.

Check%20additional%20property%20setting

Check additional property setting

 

Now let’s create the target transport nodes, starting with the QA instance.

Click on the ‘+‘ (plus) icon again.

Create%20new%20QA%20transport%20node

Create new QA transport node

 

Provide a meaningful Name for the transport node.

Set the Content Type to ‘BTP ABAP‘.

Select the Destination pointing to your BTP ABAP QA instance.

Click on ‘OK‘ to create the node.

QA%20node%20settings

QA node settings

 

Now repeat these steps for all other target nodes, in our example for the productive node.

Start%20transport%20node%20creation

Start transport node creation

 

Productive%20node%20settings

Productive node settings

 

We have now created three transport nodes.

Three%20transport%20nodes%20created

Three transport nodes created

 

We will now create two transport routes connecting the three nodes.

Click on ‘Transport Routes‘ in the navigation pane and click on the ‘+’ (Plus) icon to create a new transport route.

Open%20transport%20routes

Open transport routes

 

Let’s start with the transport route from Development to QA.

Provide a unique Name for the route. Select the development transport node as source node and the QA node as target node.

Click on ‘OK‘ to create the route.

Transport%20route%20from%20development%20to%20QA

Transport route from development to QA

 

Now let’s create the transport route from QA to Production.

Click on the ‘+’ (Plus) icon to create a new transport route.

Create%20second%20transport%20route

Create second transport route

 

Provide a unique Name for the route. Select the QA transport node as source node and the production node as target node.

Click on ‘OK‘ to create the route.

Route%20from%20QA%20to%20production

Route from QA to production

We have now created two transport routes:

Two%20transport%20routes

Two transport routes

 

You can now check the visualization of your transport landscape. Click on ‘Landscape Visualization‘ in the navigation pane. You might have to scroll down to find your ABAP transport landscape.

Landscape%20visualization

Landscape visualization

 

This concludes the setup of the integration of SAP BTP, ABAP environment and SAP Cloud Transport Management.

The creation of transport nodes and routes is documented here (nodes) and here (routes).

 

Usage

Prerequisites

  • You have created a software component (see the documentation).
  • You have cloned the software component to all your ABAP instances (see the documentation). Depending on your development concept you can clone the repository as source in your development instance and as target in the other instance (QA, production). This disables the ‘push’ functionality for QA and production.
  • You have connected your ABAP Development Tools (ADT) to your development instance.
  • You have created a package and assigned it to the software component. Additionally you have assigned the transport layer to the package which was created when cloning the repository. This ensures that gCTS (which is used behind the scenes in SAP BTP ABAP) picks up the transport requests when they are released.Package%20configuration

Create or change objects

In your ADT create a new object (or change an existing one) in a package which is assigned to the software component (and the corresponding transport layer).

In the process you are asked for a transport request. Choose an existing one or create a new one. In case of a new transport request provide a meaningful description and click on ‘Finish‘.

Create%20ABAP%20transport%20request

Create ABAP transport request

 

This creates a new transport request with a transport task containing the new (or changed) object.

New%20ABAP%20transport%20request

New ABAP transport request

 

You can now perform the needed development and eventually activate the changed objects.

 

Release ABAP transport request

After you are done with your changes and have activated your objects, you might want to transport them. Like in ‘classical’ ABAP CTS (Change and Transport System) you have to release ‘your’ transport task (and your colleagues ‘their’ transport task in the same transport request).

Right click on the transport task to open the context menu and click on ‘Release‘.

Release%20transport%20task

Release transport task

 

After all tasks have been released it is time to release the transport request itself.

Right click on the transport request to open the context menu and click on ‘Release‘.

Release%20transport%20request

Release transport request

 

The objects in the transport requests are now pushed to the central source code Git repository and a commit ID is created for the current state. This commit ID refers to the state of the complete software component, not only to the objects in this specific transport request.

It would now be possible to manually pull this commit into the target systems, but we would like to use Cloud Transport Management to have a more governed approach to deploying the content.

 

Export commit to cTMS transport request

Go to your ABAP development instance and open the ‘Manage Software Component‘ app by clicking in the corresponding tile. It can be found in the Software Component Lifecycle Management area.

Open%20Software%20Component%20app

Open Software Component app

 

Click on the software component to which you have assigned your package and your objects.

Select%20software%20component

Select software component

 

Click on the branch from which you would like to transport a commit.

Select%20branch

Select branch

 

Select the commit you would like to transport and click on ‘Export to cTMS‘. Please note that this commit comprises all previous changes to the software component (all earlier commits).

Select%20commit

Select commit

 

On the popup select the transport node in cTMS from which the cTMS transport request should be created and exported. If you only have one outbound communication arrangement of type SAP_COM_0599 you will only have one node available.

Click on ‘Export‘. After a few seconds you will (hopefully…) receive a success message about the newly created transport request.

Start%20export%20to%20cTMS

Start export to cTMS

 

Open your Cloud Transport Management instance and go to the Landscape Visualization pane. Select your QA node and open the transport queue of it.

Open%20import%20queue%20of%20QA%20node

Open import queue of QA node

 

You should see your newly created transport request which references the software component and the commit ID in its description.

New transport request

 

 

Import cTMS transport request in target system

We will now import the newly created transport request into the ABAP QA instance. In order to see the effect of the import let’s first have a look into the current state in the QA instance.

Go to your QA instance and click on the ‘Manage Software Components‘ tile.

Open%20software%20component%20app

Open software component app

 

Choose the software component in which you have done the changes.

Choose%20software%20component

Choose software component

 

Scroll down to the ‘Branches‘ area. You will see that a delta is displayed which is not yet synched. This means that the local repository of the QA instance is on a different commit level than the central source code repository.

Click on the branch in which you have done the changes. In our example there is only the ‘main’ branch available.

Choose branch

 

You now see a detailed list of all commits and their status. In our example we see three commits which have not yet been pulled to the QA instance. We will import a transport request which refers to the commit with the ID starting with ‘2ce35fcd’, which is the newest one.

Status of commits prior to import

 

Now switch to Cloud Transport Management to the import queue of the ABAP QA instance. Mark the transport request we have just created. Click on ‘Import Selected’.

Start import into QA

 

Confirm the popup by clicking on ‘OK‘, of course after carefully checking the information.

Confirm%20import%20into%20QA

Confirm import into QA

 

After some time (depending on the complexity of the changes) the import finishes (hopefully successfully like in the example). You can now access the detailed log file by clicking on the icon with the paper with the magnifying glass.

Import%20finished%20successfully

Import finished successfully

 

Let’s return to the ABAP QA instance and check the status of the commits. You might have to refresh the page.

You will see that the commit of the transport request (the top one) has been successfully pulled into the QA instance. But also the previous commits which where not yet present in the QA instance (the two below) have been pulled automatically.

As there are commits left to be pulled in this branch of this software component, the overall status has changed to ‘Synchronized (no delta)’.

Status%20of%20commits%20after%20import

Status of commits after import

 

The objects contained in the three commits are now present in the QA instance and can be tested. If the tests are successful the transport request can be imported into the productive instance.

For this go to cTMS again and open the import queue of your productive node:

Open%20import%20queue%20of%20productive%20node

Open import queue of productive node

 

When the import into the QA instance was started, the transport request was automatically forwarded to the productive node and put into the import queue.

Select the transport request and click on ‘Import Selected‘.

Start%20import%20into%20production

Start import into production

 

Confirm the popup by clicking on ‘OK‘, again of course after carefully checking the information.

Confirm%20import%20into%20production

Confirm import into production

 

After some time (depending on the complexity of the changes) the import finishes (hopefully successfully like in the example). You can now access the detailed log file by clicking on the icon with the paper with the magnifying glass.

Import%20into%20production%20successful

Sara Sampaio

Sara Sampaio

Author Since: March 10, 2022

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x