abapGit & gCTS

abapGit is an open-source Git client written in ABAP.

40.1 abapGit

abapGit is an open-source Git client written in ABAP. It serializes objects (programs, classes, DDIC, CDS, BDEFs…) into XML/source files and pushes/pulls them to Git repositories (GitHub, GitLab, Azure DevOps, Bitbucket).

On-premise: install ZABAPGIT_STANDALONE (SE38, paste the single-file source from the abapGit project) or the developer version.

BTP ABAP Environment / S/4HANA Cloud: the abapGit Repositories view in ADT (plugin from https://eclipse.abapgit.org/updatesite/).

Typical uses: open-source ABAP libraries (abap2xlsx, ABAP Logger, ajson), sharing code between systems/customers, backups, code reviews in pull requests, migrating custom code to BTP.

Online repositories (direct Git connection) vs. offline (ZIP import/export).

It doesn't replace the transport system: objects are still recorded in transports inside the SAP landscape.

40.2 gCTS (git-enabled Change and Transport System)

gCTS is SAP's own Git integration for the transport system (S/4HANA 1909+, and underlying software component handling in BTP ABAP Environment):

Repositories are linked to software components/packages; releasing a transport creates a Git commit and can push to a remote repository.

Target systems pull specific commits — enabling branching, CI/CD pipelines, and rollback.

Managed with the gCTS Fiori app and APIs used in CI tools (e.g. Project "Piper" pipelines, SAP Continuous Integration and Delivery service).

Open source community Any object to any Git repo Open source, code sharing, migration CI/CD and transport management abapGit file format abapGit-compatible format (based on abapGit serialization)

40.3 CI/CD for ABAP

Quality gates: ATC on transport release, ABAP Unit with coverage thresholds, abapLint in pull requests.

Project "Piper" (SAP open source) provides pipeline steps for ABAP environment builds (abapEnvironmentPipeline), ATC checks, and AUnit runs in Jenkins/Azure/GitHub Actions.

Transport management in the cloud: SAP Cloud Transport Management service for BTP content.

🧪 Part III Exercises

Write a generic method that takes any internal table (TYPE ANY TABLE) and returns a CSV string with a header line built via RTTI.

Using RTTC, create an internal table at runtime with columns chosen on the selection screen and fill it from a dynamic SELECT.

Find a customer exit or BAdI in a sales or purchasing transaction of your system and implement it to validate a field (in a sandbox!).

Call BAPI_FLIGHT_GETLIST (or another BAPI in your system), evaluate the RETURN table, and display the result with SALV.

Write a program that exports open orders to an application-server CSV file in background, and a second program that reads and validates the file, writing errors to an application log.

Build a CDS view entity with associations to customer and items, a calculated status text, and a parameterized aggregate view on top; consume both from ABAP SQL.

Implement an AMDP method that ranks customers by revenue and expose it via a CDS table function.

Create a managed, draft-enabled RAP business object (root + child) with a validation, a determination, an action with instance feature control, and publish it as an OData V4 UI service; test the Fiori elements preview.

Write ABAP Unit tests for the RAP validation and for a class that reads from the database, using CL_OSQL_TEST_ENVIRONMENT and the OO test double framework.

Run ATC with the cloud readiness variant on an old report, fix the findings with ABAP Cleaner and manual refactoring, and push the result to a Git repository with abapGit.