Skip to Content

abapGit has been around for a while now, one of its newer features is background mode, where it automatically pushes changed objects to the remote git repository.

Not all organizations have a git server in-house, and sometimes it might be difficult to get permission to put all the ABAP code into the cloud. So the abapGitServer project was started, it is a git server which can be installed on the ABAP application server, it is open source and MIT licensed.

If you want to try out git in connection with ABAP, abapGitServer uses the existing SAP infrastructure and does not require any licenses, plus it does not require the ABAP system to be connected to the internet. User administration is also easy, as abapGitServer can be installed on the ABAP development system, so all developers will automatically have access.

If you have something like Github Enterprise, Gitlab CE or similar in your landscape this can be used instead of abapGitServer. However, something has to be setup regarding authentication, authentication with abapGit and abapGitServer is easy as it uses logon tickets.

Follow this guide to setup automatic push from abapGit to abapGitServer.

Quick overview

abapGitServer can be started via transaction ZABAPGITSERVER. And is organized in repositories, e.g. one repository for each project.

Commits can be listed for each repository,

And show exactly what has been changed,

 

Benefits

Automatic Backup

With abapGit running in the background, all objects are automatically backed up regularly, e.g. every hour. SAP automatically creates a version when the transport is released, however with abapGit all details will be kept in history down to the hour. This is useful if code are deleted by accident, or doing too much heavy refactoring and forgetting to generate a version :o)

Full chronological history

It gives a complete overview of what has been changed across object types. If something suddenly breaks somewhere, it is possible to check the history for what has recently been changed, to see if this might have caused the error.

Versioning for non-versioned objects

abapGit works with message classes and smartforms, which are not versioned in standard SAP. With automatic backup, the non-versioned object types are versioned in git, and it is possible to see what/who has been changed.

Non-disruptive developer workflow

abapGit runs as a background job, and automatically tries to determine which developer changed the object. So there are no changes to the developer workflow, developers keep working as normal. The git backup just runs automatically and adds insights into your ABAP development.

Outro

Anyhow, try it out, its free and open source, just requires a developer key and a ABAP 7.03+ system.

Download from https://github.com/larshp/abapGitServer
Issues and pull requests welcome on the github page.

To report this post you need to login first.

10 Comments

You must be Logged on to comment or reply to a post.

  1. David Henn

    Hey,

     

    we installed it on our server and it seems to work. We like it a lot, but there is one thing we find a bit cumbersome.

    We were not able to connect our ADT eclipse to the git repository and work on that. We tried it with the standard git client, that comes with eclipse, but we are not relly sure if this would be the right way, since the ADT would not know how to deal with it.

    What we would need is the ability to perform commits directly out of eclipse ADT. Has somebody found a solution for that?

    (2) 
    1. Lars Hvam Post author

      Cool 🙂 few notes on both client and server side:

       

      Client:

      I will recommend using abapGit as the git client, however it does not have any integration into Eclipse, so you have to start ZABAPGIT to perform the git actions. As described above you can also schedule abapGit to run regularly in background and push changes automatically.

      See issue https://github.com/larshp/abapGit/issues/636 regarding abapGit Eclipse support.

       

      Server:

      abapGitServer was developed so it could be used with abapGit as the client, and this should work. However there are some issues with using normal git clients, see https://github.com/larshp/abapGitServer/issues/59, note that ‘git clone’ works.

       

      All things has to start somewhere, and hopefully more features will be implemented over time. If you ‘watch’ the abapGit and abapGitServer repositories on github you will automatically get notified when something new happens.

      (2) 
      1. David Henn

        We were actually quite stunned, with which wealth of problems you had to deal in the abapGit Client 🙂

        Our favorite part of the code (as far as we read it) is:

         METHOD fixed.
        
            DATA: lt_lengths TYPE lcl_zlib_huffman=>ty_lengths.
        
        
            DO 144 TIMES.
              APPEND 8 TO lt_lengths.
            ENDDO.
            DO 112 TIMES.
              APPEND 9 TO lt_lengths.
            ENDDO.
            DO 24 TIMES.
              APPEND 7 TO lt_lengths.
            ENDDO.
            DO 8 TIMES.
              APPEND 8 TO lt_lengths.
            ENDDO.
        
            CREATE OBJECT go_lencode
              EXPORTING
                it_lengths = lt_lengths.
        
            CLEAR lt_lengths.
            DO c_maxdcodes TIMES.
              APPEND 5 TO lt_lengths.
            ENDDO.
        
            CREATE OBJECT go_distcode
              EXPORTING
                it_lengths = lt_lengths.
        
          ENDMETHOD.                    "fixed

         

        What we also like a lot is your swagger implementation 🙂

         

        Cheers David

         

        (2) 
        1. Lars Hvam Post author

          Its part of the custom zlib implementation 🙂 it was a lot of fun to implement.

          From https://www.ietf.org/rfc/rfc1951.txt:

          3.2.6. Compression with fixed Huffman codes (BTYPE=01)
          
          The Huffman codes for the two alphabets are fixed, and are not
          represented explicitly in the data.  The Huffman code lengths
          for the literal/length alphabet are:
          
          Lit Value Bits Codes --------- ---- ----- 0 - 143 8 00110000 through 10111111 144 - 255 9 110010000 through 111111111 256 - 279 7 0000000 through 0010111 280 - 287 8 11000000 through 11000111
          (0) 
    2. Christian Guenter

      Hi David,

      how about using an inline SAPGui window in eclipse running ABAPGit? Something like this:

      It works quite well for me.

      Since some time there’s also an option to enable navigation to ADT from ABAPGit. Not quite what you’re looking for, I know, but a first step to a tighter integration. #734

       

      Regards Christian

      (2) 
      1. David Henn

        Hi Christian,

         

        thats a good idea!

        Our project  is quite large and the client takes 2 minutes to load it all (which is done several times if you want to commit). We have scheduled it in background to run every hour.

        Nevertheless, we think of speeding it up, so it can handle our load 🙂

        We have a nice framework for starting new processes which we might use here for parallelization.

        (1) 
  2. Christian Tapia Sabogal

    Hi Lars!

    I don’t know if you remember me haha. I’ve been a little bit bussy with some projects so I couldn’t stay tunned to abapGit.

    One question, how does abapGitServer work when setted in background mode? What does it do in general words? I would like to test it with a very large package (~25k objects) so I would like to know if it checks every object or not.

    Greetings,

    Christian.

    (0) 
    1. Lars Hvam Post author

      The client checks which objects to send to the git server. So it will take the same time as mentioned in https://github.com/larshp/abapGit/issues/537 to determine which objects to send to the server.

      However there is an open issue with the idea just to look at objects in unreleased transports, https://github.com/larshp/abapGit/issues/245. I assume the ~25k objects are changed and transported regularly?

       

      On the server side I have not tested this many objects, but a lot of the heavy lifting code is shared between abapGit and abapGitServer, so it might work out 🙂

      (1) 

Leave a Reply