Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

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:

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:

Now use the context menu of the Local History view to choose a previous local version/local edit to compare with:

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

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:

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

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:

Then use the context menu of the Revision History view to choose a previous revision to compare with:

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

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

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

and browse through the highlighted differences or changes in the source code:

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.

14 Comments