Technology Blog Posts by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
Harald_Stevens
Product and Topic Expert
Product and Topic Expert
32,074

Table of Content

Overview

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).

SvenRullmn_8-1752505918105.png

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

SvenRullmn_9-1752505953298.png

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 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

SvenRullmn_10-1752505995822.png

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 Communication Arrangements

On the communication arrangements overview screen select 'New'.

Create new Communication Arrangement

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

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 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 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 for Host Name and Token Endpoint

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

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 clientid and clientsecret

Click on 'Save' to create the communication system.

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 communication arrangement

The Communication Arrangement can now be used.

Communication arrangement ready

Please also check out the documentation

Inbound Communication Arrangements SAP_COM_0948 in ABAP QA and PROD

SvenRullmn_5-1752504995946.png

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 Communication Arrangements

Click on the 'New' button.

New inbound communication arrangement

Select the Scenario 'SAP_COM_0948', choose an Arrangement Name and click on 'Create'.

SvenRullmn_0-1752672989091.png

Choose scenario SAP_COM_0948

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.

SvenRullmn_1-1752673146446.png

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 inbound communication system

Select the checkbox 'Inbound Only'.

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 inbound communication user

Click on 'New User'.

 

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 user name and password

Confirm the user by clicking on 'OK'.

Confirm user

Click on 'Save' to create the communication system.

Save inbound communication system

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

The Communication Arrangement should look roughly like this. You will use the Manage Software Components API later when creating a destination.

SvenRullmn_3-1752674437027.png

Click on 'Save' to create the communication arrangement.

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

SvenRullmn_6-1752505242648.png

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 new destination

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

Destination settings

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

SvenRullmn_4-1752674738959.png

Data from inbound communication arrangement

From here copy the Service URL from the row Manage Software Components 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 URL, user and password

Click on 'Check Connection'.

Check connection

It should return '200: OK'

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

SvenRullmn_7-1752505378760.png

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 Cloud Transport Management

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

Open transport nodes

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

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 node

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

Check additional property setting

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

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

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 node settings

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

Start transport node creation

Productive node settings

We have now created three transport nodes.

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 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 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 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 from QA to production

We have now created two transport routes:

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 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 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.



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 ABAP transport request

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

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 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 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 Software Component app

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

Select software component

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

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 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 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 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 software component app

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

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 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 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 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 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 import into production

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

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 into production successful

This concludes this blog post. Please do not hesitate to leave your feedback.

 

 

21 Comments