Friday 6 May 2022

gCTS configuration and integration with GitHub

SAP has launched Git-enabled Change and Transport system (gCTS) back in 2019 with S/4 HANA 1909 to manage the ABAP changes which can leverage Git as an external system for Version Management.

Now let us understand what are the planned use cases of gCTS are:

Planned use case 1: You need to build N+1 landscape for new project requirement

Using gCTS we can create a Feature branch and a Maintenance branch and perform changes in the same N landscape development system in parallel.

We will understand how this can be achieved in further blogs where we will discuss how gCTS works.

Planned use case 2: Two developers need to work on the same object parallelly.

In this scenario using gCTS Team A and Team B can work on the changes parallelly and merge them into Git Repository. Once the changes are merged to the Git repository these changes can be pulled into the Master branch and deployed changes in QA. During the merging of changes into QA, gCTS will take care of version management using Solve conflict method, which will be discussed in the future blog.

Now that we saw the use cases of gCTS let us discuss how to configure these tools in your landscape.

First let’s compare what are different Transport and Deployment options provided by SAP

SAP ABAP, SAP ABAP Exam, SAP ABAP Exam Preparation, SAP ABAP Learning, SAP ABAP Career, SAP ABAP Skills, SAP ABAP Jobs, SAP ABAP Connectivity, SAP ABAP Development
Different Transport and Deployment options provided by SAP

Now let’s deep dive in to gCTS configuration part.

To enable gCTS we require a Git platform host, an ABAP system in which code will be developed, and a CI server (which is optional) which can be used to automate development cycle.

Below are the prerequisites which are required to enable gCTS for ABAP system:

- An SAP S/4 HANA 1909 or 2020 system
- An SapMachine (with version 11 or higher) or comparable JRE
- Import relevant SAP Central note and based on SP level
- Create gCTS related working directories at OS level

Once the prerequisites are met and the ABAP system is ready, our next step is to proceed with the configuration. We will discuss the configuration part in 3 steps which are

1. gCTS configuration on ABAP system
2. Git enablement
3. CI/CD pipeline configuration (optional)

Let us go through each of these steps to better understand the configuration.

1. gCTS Configuration:

We need to perform the below steps in the ABAP system to complete the gCTS configuration.

◉ Validate required SAP notes are implemented
◉ Authorizations
◉ Validate required ports are opened
◉ gCTS Fiori UI enablement
◉ Set parameters, Initialize systems

Apart from the above mentioned, we also need to create repositories on ABAP system which we will discuss in next blog.

1. The very first step is to make sure the required notes are implemented in your ABAP system.

i. 2821718 – Central Note for Git-enabled Change and Transport System (gCTS)
ii. 2827411 – Delivery of SAP Fiori app for Git-enabled Change and Transport System (gCTS)

2. In below steps we will see how to activate Fiori and required authorizations to assign to GCTSOBSERVER user which is used for running the Observer job and the parameters to enable communication between Git and ABAP system.

3. As a first step please make sure to activate below oDATA and ICF Services related to gCTS.

Component External Technical Name 

OData Service

ICF Service

ICF Service

SCTS_GCTS_SRV

/sap/bc/ui5_ui5/sap/bc_cts_git

/sap/bc/cts_abapvcs


4. Next create a PFCG role with Catalogue ID: SAP_BASIS_TCR_T and assign that to the user who will configure gCTS. All the required authorizations are delivered as part of role SAP_BC_GCTS_ADMIN.

5. Make sure you activate services CTS_ABAPVCS and BC_CTS_GIT in your ABAP front-end server.

6. Once the authorizations are maintained please make sure you open the below ports in order to establish communication between ABAP and Git.

- Port 22 is required for SSH communication between the Git client on the operating system of the ABAP server and the remote repository on the Git server.
- Port 443 is required for secure communication (HTTPS) between the ABAP runtime and the remote repository on the Git server.

7. Once the ports and services are activated launch the gCTS Fiori app and perform the below steps:

SAP ABAP, SAP ABAP Exam, SAP ABAP Exam Preparation, SAP ABAP Learning, SAP ABAP Career, SAP ABAP Skills, SAP ABAP Jobs, SAP ABAP Connectivity, SAP ABAP Development

SAP ABAP, SAP ABAP Exam, SAP ABAP Exam Preparation, SAP ABAP Learning, SAP ABAP Career, SAP ABAP Skills, SAP ABAP Jobs, SAP ABAP Connectivity, SAP ABAP Development

8. Click on Enable gCTS and provide the required parameters

9. Provide gCTS directory path which is created at OS level and click on Save

SAP ABAP, SAP ABAP Exam, SAP ABAP Exam Preparation, SAP ABAP Learning, SAP ABAP Career, SAP ABAP Skills, SAP ABAP Jobs, SAP ABAP Connectivity, SAP ABAP Development

10. In next step provide Java Runtime variable path and click on Save

SAP ABAP, SAP ABAP Exam, SAP ABAP Exam Preparation, SAP ABAP Learning, SAP ABAP Career, SAP ABAP Skills, SAP ABAP Jobs, SAP ABAP Connectivity, SAP ABAP Development

11. In next step please provide path to abap2vcs.jar path which enables communication between ABAP and Git. Required variables are provided under parameter JAVA_RUNTIME. Click Save and proceed

SAP ABAP, SAP ABAP Exam, SAP ABAP Exam Preparation, SAP ABAP Learning, SAP ABAP Career, SAP ABAP Skills, SAP ABAP Jobs, SAP ABAP Connectivity, SAP ABAP Development

12. And now in next step we need to Schedule the observer job. This can be achieved by just clicking on Initialize system shown below:

SAP ABAP, SAP ABAP Exam, SAP ABAP Exam Preparation, SAP ABAP Learning, SAP ABAP Career, SAP ABAP Skills, SAP ABAP Jobs, SAP ABAP Connectivity, SAP ABAP Development

SAP ABAP, SAP ABAP Exam, SAP ABAP Exam Preparation, SAP ABAP Learning, SAP ABAP Career, SAP ABAP Skills, SAP ABAP Jobs, SAP ABAP Connectivity, SAP ABAP Development

13. Now click on Step 5 and proceed with summary and Health check.

SAP ABAP, SAP ABAP Exam, SAP ABAP Exam Preparation, SAP ABAP Learning, SAP ABAP Career, SAP ABAP Skills, SAP ABAP Jobs, SAP ABAP Connectivity, SAP ABAP Development

14. All the parameters should be Green and OK.

SAP ABAP, SAP ABAP Exam, SAP ABAP Exam Preparation, SAP ABAP Learning, SAP ABAP Career, SAP ABAP Skills, SAP ABAP Jobs, SAP ABAP Connectivity, SAP ABAP Development

15. After the configuration is completed we can see the parameters provided under Configuration tab as below:

SAP ABAP, SAP ABAP Exam, SAP ABAP Exam Preparation, SAP ABAP Learning, SAP ABAP Career, SAP ABAP Skills, SAP ABAP Jobs, SAP ABAP Connectivity, SAP ABAP Development

With this step we can confirm that gCTS configuration is completed in ABAP system.
Next step is to Clone repositories and Create branches in gCTS. We will discuss this steps post GitHub configuration.

2. GitHub Platform:


Once gCTS configuration is completed our next step is to create repositories in Git which are used to configure gCTS. Below are the detailed steps on how we can create repositories in Git.

1. Go to Github.com

SAP ABAP, SAP ABAP Exam, SAP ABAP Exam Preparation, SAP ABAP Learning, SAP ABAP Career, SAP ABAP Skills, SAP ABAP Jobs, SAP ABAP Connectivity, SAP ABAP Development

2. Create an account or proceed with login if you already have one

3. Once logged in please create repository as below:

SAP ABAP, SAP ABAP Exam, SAP ABAP Exam Preparation, SAP ABAP Learning, SAP ABAP Career, SAP ABAP Skills, SAP ABAP Jobs, SAP ABAP Connectivity, SAP ABAP Development

4. Create both Workbench and Customizing repositories for the changes. Select below options and click on Create Repository:

SAP ABAP, SAP ABAP Exam, SAP ABAP Exam Preparation, SAP ABAP Learning, SAP ABAP Career, SAP ABAP Skills, SAP ABAP Jobs, SAP ABAP Connectivity, SAP ABAP Development

SAP ABAP, SAP ABAP Exam, SAP ABAP Exam Preparation, SAP ABAP Learning, SAP ABAP Career, SAP ABAP Skills, SAP ABAP Jobs, SAP ABAP Connectivity, SAP ABAP Development

5. Now create customizing repository also in the same way

SAP ABAP, SAP ABAP Exam, SAP ABAP Exam Preparation, SAP ABAP Learning, SAP ABAP Career, SAP ABAP Skills, SAP ABAP Jobs, SAP ABAP Connectivity, SAP ABAP Development

This concludes the repository creation on GitHub end.

Source: sap.com

No comments:

Post a Comment