Why abapGit Could Not Pull My RAP Objects

Why abapGit Could Not Pull My RAP Objects

SAP

While using abapGit to push objects to GitHub or pull them into an SAP BTP or on-premise system, you may encounter several issues. In this blog, I want to share one such case where I found myself stuck for hours.

Initial Setup

I created a GitHub repository (for example, SAP-RAP-Apps) with two branches:
main and secondary.

My RAP application in ADT was organized in a multi-level package structure as shown below:

zsachin_rap  
 └─ zsachin_unmanaged_apps  
     └─ zsachin_2025_unmanaged  
         └─ RAP app objects

For a while, everything worked perfectly. I was able to push and pull objects between SAP and GitHub without any issues.

Why I Changed the Folder Structure

Later, I realized that all my RAP objects should ideally be placed under a single folder named zsachin_unmanaged, which would be a direct child of zsachin_rap.

Since I was working on an SAP BTP trial account (which expires every 90 days), I decided to make this structural change directly in GitHub instead of doing it from ADT.

I moved all objects from:

zsachin_2025_unmanaged

to:

zsachin_unmanaged_apps

and then renamed the folder zsachin_unmanaged_apps to zsachin_unmanaged.

The new structure looked much cleaner.

The Problem

When I created a new BTP trial account and tried to pull the RAP application using abapGIT, nothing was pulled.

No errors.
No objects.
Just… nothing.

The Root Cause

The issue was related to the .abapgit.xml file.

The .abapgit.xml file is part of the repository configuration and is committed to Git.
It defines the starting folder that abapGIT uses to locate the source code within the repository during push and pull operations.

Since I changed the folder structure in GitHub, the starting folder path in .abapgit.xml was no longer valid.

Original .abapgit.xml

abapGit path original

Updated .abapgit.xml

After updating the folder structure, I modified the file as shown below:

abapGit path updated

Final Outcome

Once this change was made, the pull worked perfectly. All RAP objects were imported as expected.

This was a small but important learning:
Whenever you change the folder structure in GitHub, always update the .abapgit.xml file accordingly.

It definitely saved me from repeating the same mistake in the future.

Tags: #sap