Friday 26 April 2024

SAP BTP, ABAP in the Cloud Custom Code Transformation using abapGit and gCTS

abapGit and gCTS (Git-enabled Change and Transport System)

◉ The basic idea behind abapGit is to exchange source code between any ABAP systems using a Gitbased repository.

SAP BTP, ABAP in the Cloud Custom Code Transformation using abapGit and gCTS

◉ By introducing gCTS, SAP is aiming for the best of both worlds, that is, repository-based
development where concurrent work on the same object is possible, while retaining all the benefits of
central development.

◉ Following is the process flow for gCTS.

SAP BTP, ABAP in the Cloud Custom Code Transformation using abapGit and gCTS

◉ You can use gCTS to distribute your custom code through a central repository, which will enable
possible rollbacks before importing to the target system, if required.
◉ You can possibly use abapGit to move your on-premise ABAP objects to SAP BTP, ABAP
environment. In the next section, we’ll demonstrate how to use abapGit to move ABAP objects from
your SAP S/4HANA on-premise environment to SAP BTP, ABAP environment.

Custom Code Transformation Using abapGit

◉ Transforming on-premise ABAP code to SAP BTP requires three primary steps.
  ◉ Evaluating current code.
  ◉ Installing abapGit.
  ◉ Transforming code.

Evaluation of On-Premise code for Compatibility

◉ Make sure that your code is using the ABAP for SAP BTP language version (ABAP for SAP Cloud
Platform).
◉ Once the language version is changed, execute ATC check or transaction SCI to check for any issues.

Installing abapGIT on an On-Premise and as an Eclipse Plugin

On-Premise

◉ Create a new repository on GitHub.

SAP BTP, ABAP in the Cloud Custom Code Transformation using abapGit and gCTS

◉ Give a name to the repository and click the “Create Repository” button

SAP BTP, ABAP in the Cloud Custom Code Transformation using abapGit and gCTS

◉ Visit https://github.com/abapGit/abapGit and click on the latest build as follows. This simply has the
code for an ABAP report program.

SAP BTP, ABAP in the Cloud Custom Code Transformation using abapGit and gCTS

◉ Create a report program on your on-premise SAP system and copy the code you see above into the
program and activate.

SAP BTP, ABAP in the Cloud Custom Code Transformation using abapGit and gCTS

◉ The following screen should appear once you execute this program

SAP BTP, ABAP in the Cloud Custom Code Transformation using abapGit and gCTS

◉ abapGit has now been installed on the on-premise system

As an Eclipse Plugin

◉ Open ADT->Help->Install new software and enter the following URL to load abapGIT for ABAP
development on ADT.

◉ Simply click on “Next” and install the plugin

SAP BTP, ABAP in the Cloud Custom Code Transformation using abapGit and gCTS

Transform code form on-premise to cloud

◉ Visit your GitHub repository and copy the URL corresponding to your repository.

SAP BTP, ABAP in the Cloud Custom Code Transformation using abapGit and gCTS

◉ Go back to your ABAP report program on the on-premise system, Click new online.

SAP BTP, ABAP in the Cloud Custom Code Transformation using abapGit and gCTS

◉ Paste the URL you copied above to the following location, along with the package that you want to
commit to the Git Repository you created above. This is the package that is in your on-premise
system, which you want to migrate to the cloud environment.

SAP BTP, ABAP in the Cloud Custom Code Transformation using abapGit and gCTS

◉ Click on “Create Online Repo”.
◉ Once the execution is completed, you should see the cloned repository as follows, which is ready to
be committed to the online Git Repository.

SAP BTP, ABAP in the Cloud Custom Code Transformation using abapGit and gCTS

◉ Now click on “stage” and “commit all changes” to the online repository

SAP BTP, ABAP in the Cloud Custom Code Transformation using abapGit and gCTS

◉ Give a comment for the commit that you do each time as follows. Click on “Commit”

SAP BTP, ABAP in the Cloud Custom Code Transformation using abapGit and gCTS

◉ This will request for your GitHub credentials, to authenticate. Give them and Continue.

SAP BTP, ABAP in the Cloud Custom Code Transformation using abapGit and gCTS

◉ Once the commit is complete, you should see a message as follows

SAP BTP, ABAP in the Cloud Custom Code Transformation using abapGit and gCTS

◉ And the source code under the package should be available in your online Git Repository.

SAP BTP, ABAP in the Cloud Custom Code Transformation using abapGit and gCTS

◉ Open ADT on Eclipse-> Select Your ABAP in the cloud Project -> Window -> Show -> Other ->
abapGit Repositories.
◉ Click the “Plus” button to link your abapGit Repository to ADT. Give the URL corresponding to your Git Repository here as well.

SAP BTP, ABAP in the Cloud Custom Code Transformation using abapGit and gCTS

◉ Create a package in your ABAP in the cloud project, to which you will be importing all the supported
objects in your on-premise ABAP package. Here I have given the same package name.
◉ Make sure to put the “Pull after link” tick as well, so the objects will be pulled from your online Git Repository into ABAP in the cloud project.

SAP BTP, ABAP in the Cloud Custom Code Transformation using abapGit and gCTS

◉ Once that is completed, you should see all supported objects on your on-premise system, imported
into your ABAP in the cloud package.

SAP BTP, ABAP in the Cloud Custom Code Transformation using abapGit and gCTS

No comments:

Post a Comment