Skip to Content

Which levels of versioning do the ABAP Development Tools (ADT) support and how can I compare the source code of specific development objects over time or even across different systems?

The Eclipse-based ABAP Development Tools (ADT) offer two basic, built-in levels of version control or revision control for development resources: A client-side, local history and a server-side revision history. Thus, you can compare and restore different source code versions on both levels and even do a cross-system comparison as shown below.

1. Local History

First of all, ADT keeps a local history of all development resources you are working on. This is a standard Eclipse feature which saves a copy of the current resource on the local file system each time you edit and save it. You can even customize this local history within the Eclipse preferences, for instance I would recommend to increase the number of days to keep these snapshots:

/wp-content/uploads/2012/07/local_history_prefs_122653.png

Thus, you can compare and restore all locally saved versions (Eclipse calls it local edits) by calling the Local History view using the context menu in the ABAP source code editor:

/wp-content/uploads/2012/07/call_local_history_119052.png

Now use the context menu of the Local History view to choose a previous local version/local edit to compare with:
/wp-content/uploads/2012/07/local_history_view_119053.png

The ABAP Compare editor opens and displays the source code differences of the two local versions using markers:

/wp-content/uploads/2012/07/compare_local_version_121032.png

Using the buttons of the Compare editor you now have the options to copy the changes from one resource to the other or navigate through the changes:

/wp-content/uploads/2012/07/compare_editor_buttons_121037.png

Alternatively, you can quickly replace the current local version with a previous version by using the context menu of the Local History view:

/wp-content/uploads/2012/07/restore_local_version_121038.png

2. Revision History

The second option is to use the revision history which offers access to the server-side version management for all repository objects. In contrast to the first option these ‘revisions’ are managed by the CTS on the server, are visible to all developers, and simply spoken reflect the code level of specific change or transport requests. For more information about the automatic creation of new versions by the CTS and how to create temporary versions on the server please refer to the online documentation.

Simply use the context menu of the ABAP source code editor to call the Revision History view:

/wp-content/uploads/2012/07/call_revision_history_119060.png

Then use the context menu of the Revision History view to choose a previous revision to compare with:
/wp-content/uploads/2012/07/compare_revision_history_119061.png

The ABAP Compare editor opens and displays the source code differences of the latest version compared to the selected revision:

/wp-content/uploads/2012/07/compare_revision_121113.png

You may also use the control-key to mark two specific revisions to compare with each other:

compare_previous revisions.png

On this level restoring the content of a specific revision is currently only supported via copy-and-paste in Eclipse or using the classical Version Management screen in SAP GUI (see online documentation).

3. Cross-system Comparison

The last, but very interesting option is to compare the latest version of a development object within different ABAP systems. For example, you could compare the code level of specific ABAP resources between your DEV, QAS and your PRD system. Just use the context menu in the project explorer to call the compare editor

/wp-content/uploads/2012/07/call_cross_comparison_119062.png

and browse through the highlighted differences or changes in the source code:
/wp-content/uploads/2012/07/cross_comparison_119066.png

As already mentioned this option is really useful in case you want to check whether your latest source code already reached a specific target system or if you simply want to detect the source-code differences of one system compared to another system.

I hope, this post sheds some light on the different options and their potential usage.

To report this post you need to login first.

6 Comments

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

  1. Oliver Tesch

    Is it possible to compare every property and part of an development object?

    I want to see differences of an whole class with all methods, attributes, Interface and so on.

    We are looking for a possibility to compare our state of development between two Systems.

    (0) 
    1. Thomas Fiedler

      Hi Oliver,

      yes this is possibille you can compare objects between different systems.

      You find it also in the “Compare With…” context menu. All ABAP projects that are configured in your eclipe are listed there.

      Have fun.

      Regards,

      Thomas.

      (0) 
  2. Raghu Govindarajan

    Sorry for the extra large screen capture here. I was right clicking all over the place for the last 2 days trying to get the context menu in your screen shot for local history – so, I thought I would share some the places I tried clicking 😛 and the right place which is the program/class name in the code window.

    if there is better place, please let me know. For future versions, is it possible to add this to the context menu on the Project Explorer?

    LocalHistoryContextMenu.jpg

    (0) 
  3. Timo John

    We just found the isseu that in our setting the sort order of Methods in a class is done in alphabetical order after transport the methods on the second system are ordered alphabetical. this makes the source code comparism useless…

    What do we have to set up different?

    System:

    SAP_BASIS 750 0007 SAPK-75007INSAPBASIS

    SAP_ABA     750 0007 SAPK-75007INSAPABA

    ABAP Development Tools for SAP NetWeaver Version: 2.77.2

    (0) 

Leave a Reply