Skip to main content

gCTS workflow

Goal

Use SAP's git-enabled CTS (gCTS) for version control instead of transports (or on top of them). Unlike abapGit roundtrip, gCTS runs on the SAP server: the system itself is a git client, repos live inside SAP, and adt gcts just drives the /sap/bc/cts_abapvcs/* endpoints.

Prerequisites

  • adt-cli installed and authenticated
  • gCTS enabled on the SAP system (check with adt fetch /sap/bc/cts_abapvcs/)
  • A remote git host (GitHub / GitLab / BitBucket Server) reachable by the SAP system — not from your laptop
  • VCS token for the remote (personal access token, deploy key, ...)

Steps

1. Create a gCTS repository on SAP

adt gcts repo create zdemo https://github.com/acme/zdemo.git \
--role SOURCE --type GITHUB \
--starting-folder src/ \
--vcs-token "$GITHUB_PAT" \
--json

zdemo is the gCTS repository ID — use it in every subsequent command.

2. Clone into the SAP server

adt gcts repo clone zdemo

This pulls the git repo's content into the system. Objects land in the package configured for zdemo (default: a package named after the rid).

3. Pull the latest

adt gcts repo pull zdemo

4. Commit your local SAP changes

gCTS commits scope by ABAP package or transport:

# Commit an entire package
adt gcts commit zdemo -d \$ZDEMO -m "Add customer view"

# Commit a transport
adt gcts commit zdemo --corrnr DEVK900001 -m "Release TR"

The commit is automatically pushed to the remote.

5. Branching

adt gcts branch list zdemo --all
adt gcts branch create zdemo feature/customer
adt gcts branch switch zdemo feature/customer

6. History

adt gcts log zdemo
adt gcts objects zdemo # list repository objects

7. Cleanup

adt gcts repo delete zdemo

gCTS vs abapGit vs transports

AspectgCTSabapGitTransports (STMS)
Runs whereSAP serverYour laptop (disk ↔ SAP)SAP server
TargetRemote git repoLocal filesystem + any gitSAP target systems
FormatAFF (JSON-heavy, new)abapGit classic (XML)Binary TR files
Commit scopePackage or transportAny editTransport
Cross-landscapeYes (git pull on target)Yes (checkin on target)Yes (STMS import)
CLI command groupadt gctsadt checkout / checkinadt cts

Rule of thumb: gCTS is for SAP-server-driven git; abapGit is for developer-machine-driven git; transports remain the native change vehicle. See Format comparison for file-level differences.

Troubleshooting

ErrorCauseFix
SSL handshake failed on cloneSAP can't reach github.com — firewall or missing CABasis adds the CA to STRUST (SSL client SSL client (Anonymous))
403 Forbidden on pushVCS token lacks repo scopeRegenerate PAT with write access, adt gcts config zdemo set VCS_TOKEN $NEW
Commit failed: nothing to commitNo modified objects in package / transportConfirm changes: adt ls \$ZDEMO --modified, or commit by transport instead
Repository not foundrid is case-sensitive and lower-case by conventionUse exact rid from adt gcts repo list

See also