Skip to Content

Calling abapGit directly from Abap in Eclipse

I am sure the open source project abapGit and the development environment Abap in Eclipse are already well known, therefore I skip the introduction of them. 

For commiting your ABAP code from Eclipse to a GIT repository currently the following steps are necessary:

  1. Open an SAP GUI (either as a particular instance or within  ABAP in Eclipse)
  2. Start the transaction ZABAPGIT
  3. Select a specific ABAP package
  4. Peform the desired Git commands

The first three points are always identical, thus they are perfect candidates to be automated.

The first two points I have already completed but with point 3 … I am struggling, but to this point a bit later.

To get the first two points working automatically is now quite easy. The only necessary step is to go to the Eclipse marketplace and install or update the free plugin ABAP Continuous Integration. After completing  this installation you get an additional menu entry: abapGit, invokable also with the Shortcut Ctrl+Alt+K. Of course abapGit has to be already installed before.

Pushing the menu item or pressing the shortcut opens abapGit for the currently selected project in the project explorer.
Currently an ABAP development package or an child object of this package has to be activated to get the shortcut and the menu item working but I will investigate how to get the functionality available for the whole workspace.

Well if you are constanly working with the same package or the clicks to change the package do not bother you … perfect – the new menu item will save you hopefully a lot of time when calling abapGit out of the Eclipse environment.

If you would like also to get also the package change automated, you are welcome to join the abapGit community package change challenge 😉 .Any idea, hint or anything else helpful is welcome – lets solve this challenge together.

What I tried already:

Approach 1: Changing the package with an ADT rest service.

I have already created a prototype with the ADT SDK to get the package name and the username to the ABAP backend. See. ABAPCI_ABAPGIT – connection from Eclipse to abapGit. The only thing that is missing is how to trigger the package change on the abapGit side.

Refreshing the abapGit Transaction, or reloading it?

Details for the ADT SDK:


Approach 2: Calling the ZABAPGIT transaction with parameters

With the ADT SDK it is also possible to open a transaction with parameters. On thing todo with this approach is certainly adapt abapGit to consider this parameters. The harder part with this approach is maybe to not loose the already inserted git repository credentials.


Approach 3: Ideas welcome

You must be Logged on to comment or reply to a post.
  • Hi Andreas,

    we are already working on a native abapGit Integration into Eclipse.

    Colleagues would be more than happy to get you on board.




    • Hi Thomas!

      Good to hear that abapGit will be integrated also into Eclipse. Of course the approach shown in this blog will be obsolete starting from the time the native integration will be available.

      Would be a pleasure for me to get involved in the development as I am already very curious how it will look like.

      Have a nice weekend, Andreas

  • I have installed the plug in, but the menu option does not seem to be there on any of the context menus and CTRL+ALT+K does not do anything.

    There is a little button at the top which calls up the CI view, with a “Java Nill Pointer” error as well. That is better than last time I tried a month ago where I got the Eclipse equivalent of a short dump. I installed an update to your CI plug-in since then.

    In that view there is a button with “Launch abapGit” and a red icon to do the same. Neither does anything when I click them, and yes I do have abapGit installed on the SAP system!

    Also how do you assign a colour to an SAP system? I cannot see any option to do that.

    I am very impressed with what you are trying to achieve here, by the way.




    • Hi Paul!

      The Java Null Pointer does surprise me a bit, could you please tell me if you get the error also with the latest version 0.3.12 and if yes maybe post the stacktrace.

      Well if everything is working like expected the current behavious should be:

      The menu option currently is only shown if you have marked a package or a development object within a package.  If clicked or respectively using the shortcut while the project explorer item is still marked abapgit should open for the destination to that the package/object is assigned.

      I fixed the “Launch abapGit” button and the function behind the Git-icon, I uploaded version 0.3.12 to the Eclipse marketplace just now. The button and the icon only work if you have set the development  project in the Eclipse settings: Preferences -> ABAPCI -> The first text box should include the name of your DEV system displayed in the project explorer.

      To assign a color to an ABAP project open the View “ABAP Colored Project” – with a right button click you can add a project and assign a color – although this feature currently does not support all development objects.

      Thanks for your appreciation, I thought it is easier to tame a monster like Eclipse although ADT facilitates a lot, but I think I should not try to tell you something about monsters 😉

      • Thank you very much for responding. I just opened Eclipse and installed the update to ABAP CI.

        Now the abapGit screen opens when I press the button – I still get the null pointer exception. Forgive my ignorance but I have no idea how to look at the stack trace so i can show it to you. If you can tell me how you would be doing me a favour.

        In regard to the coloured projects thing, again I got a fatal error, but this time it did show me the trace:-

        at abapci.xml.ColoredProjectModelXml.getColoredProjects(
        at abapci.model.ColoredProjectModel.getColoredProjects(
        at abapci.presenter.ColoredProjectsPresenter.setViewerInput(
        at abapci.presenter.ColoredProjectsPresenter.<init>(
        at abapci.views.AbapCiColoredProjectView.createPartControl(
        at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(
        at org.eclipse.ui.internal.e4.compatibility.CompatibilityView.createPartControl(
        at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.e4.core.internal.di.MethodRequestor.execute(
        at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(
        at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(
        at org.eclipse.e4.core.internal.di.InjectorImpl.inject(
        at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(
        at org.eclipse.e4.core.internal.di.InjectorImpl.make(
        at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(
        at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(
        at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(
        at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(
        at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(
        at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(
        at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(
        at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$
        at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(
        at org.eclipse.e4.ui.workbench.renderers.swt.ElementReferenceRenderer.createWidget(
        at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(
        at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(
        at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(
        at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$0(
        at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$
        at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(
        at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.showTab(
        at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.lambda$0(
        at org.eclipse.swt.widgets.Synchronizer.syncExec(
        at org.eclipse.ui.internal.UISynchronizer.syncExec(
        at org.eclipse.swt.widgets.Display.syncExec(
        at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(
        at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(
        at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(
        at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(
        at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(
        at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(
        at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(
        at org.eclipse.equinox.internal.event.EventComponent.sendEvent(
        at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(
        at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(
        at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(
        at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(
        at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(
        at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(
        at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(
        at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(
        at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(
        at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(
        at org.eclipse.ui.internal.WorkbenchPage.showPart(
        at org.eclipse.ui.internal.WorkbenchPage.busyShowView(
        at org.eclipse.ui.internal.WorkbenchPage$
        at org.eclipse.swt.custom.BusyIndicator.showWhile(
        at org.eclipse.ui.internal.WorkbenchPage.showView(
        at org.eclipse.ui.internal.WorkbenchPage.showView(
        at org.eclipse.ui.handlers.ShowViewHandler.openView(
        at org.eclipse.ui.handlers.ShowViewHandler.openOther(
        at org.eclipse.ui.handlers.ShowViewHandler.execute(
        at org.eclipse.ui.internal.handlers.HandlerProxy.execute(
        at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.e4.core.internal.di.MethodRequestor.execute(
        at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(
        at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(
        at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(
        at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(
        at org.eclipse.core.commands.Command.executeWithChecks(
        at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(
        at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(
        at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(
        at org.eclipse.ui.internal.ShowViewMenu$
        at org.eclipse.jface.action.Action.runWithEvent(
        at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(
        at org.eclipse.jface.action.ActionContributionItem.lambda$4(
        at org.eclipse.swt.widgets.EventTable.sendEvent(
        at org.eclipse.swt.widgets.Display.sendEvent(
        at org.eclipse.swt.widgets.Widget.sendEvent(
        at org.eclipse.swt.widgets.Display.runDeferredEvents(
        at org.eclipse.swt.widgets.Display.readAndDispatch(
        at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(
        at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(
        at org.eclipse.ui.internal.Workbench.lambda$3(
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(
        at org.eclipse.ui.internal.ide.application.IDEApplication.start(
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.equinox.launcher.Main.invokeFramework(
        at org.eclipse.equinox.launcher.Main.basicRun(

        How can anyone make head or tail of these Java error logs? They are worse than the hexadecimal bits of a ST22 dump.

        Also, I want to use you (more specifiaclly the CI Eclipse plug-in) as an example in the next edition of my book of a useful Eclipse Plug-In. Is that OK with you?

        Cheersy Cheers


        • Hi Paul!

          I think I know the reason, in an early first version I used another XML structure. If you delete this old file a new one will be created. A detailed explaination can be found  here:
          (Anyway in the latest version of today you should not see the nullpointer anymore but get a message which points you to the just mentioned issue description).

          The deletion or renaming of this old file should hopefully solve both errors. If not let me know. I agree with you the Java stacktraces are really special – I only look at the first few lines there is mostly the relevant line in the code which throws the exception.

          It would be an honour for me if the plugin gets mentioned in your next book.

          Cheers, Andreas


          • Cheers for that, I delted the file and installed the latets updtae and evrything works like a charm now.

            Cheersy Cheers


  • Hi Andreas,

    very nice indeed. When abapGit is opened I see the home screen and not the linked repository, but that should be case if I got you right, right?



    • Hi Christian!

      Yes exactly, up to now I am stuck with the automatic change of the package within abapGit. But hopefully the feature also helps you a bit also in the current state.


      Greetings, Andreas

  • Dear Andreas,

    I really enjoy what you are doing and wanted to check out the state of the CI Eclipse plugin.
    Sadly when I try to install the plugin via the Eclipse marketplace I get this error message:

    Unable to read repository at PKIX path building failed: unable to find valid certification path to requested target 

    Is there something wrong with the plugin, or is there something wrong on my side?

  • Dear Andreas,

    Great work! Does anybody else have trouble with Photon?  I compare it to a manual (Save -> Activate -> Perform Unit Tests ) execution. The ABAP CI Plugin has a much longer runtime.


    • Hi Thorsten!

      The reason for that is maybe that the Unit tests are running in some cases twice and with some delay. The activation of the ABAP objects is asynchronous. But on the other side the Unit testrun from the ABAP CI plugin is executed in the background.
      If you have packages with a lot of unit tests there is also the option “Run Unit tests only for activated ABAP objects” – feel free to try this checkbox (its the second one in the ABAP CI preferences).

      Greetings, Andreas