LiveCompare 3.8: Compare Class Versions

How do you compare versions of an ABAP class? It’s a bit of a trick question because classes aren’t versioned. Classes are made up of several independently versioned components including:

  • Public properties
  • Protected properties
  • Private properties
  • Methods

Trying to compare two class versions means you must identify which parts should be compared. Then which versions of the chosen parts. All the while trying to maintain all the bits in your head to get a sense of the whole class.

It’s not easy.

LiveCompare 3.8 reduces this to simply choosing two points-in-time (we use released transports as a proxy for the points-in-time and “active” to represent the current state of each component) and clicking the Compare button. LiveCompare does the hard work of weaving together all the components to produce a simple side-by-side comparison of the class.

Walkthrough

Start Quick Compare and enter the name of a CLAS:

Click Explore Versions and choose two “versions”:

LiveCompare always adds the pseudo-version “active” and sorts the list in descending order. With a version from each side selected, click Compare:

Compare this screen with the results of comparing a CLAS in LiveCompare 3.7R3:

The most obvious change is CLAS are now treated as complex object types made up of sub-components: public, protected, private and methods. Each sub-component is accessible via the hierarchy. Since we compared two versions, status icons indicate the components of the class that are the same, different or unique to one of the versions.

Selecting Methods and switching to the Code tab shows:

This is comparable to how classes were compared in LiveCompare 3.7R3 – we grabbed all the method code and stuffed it into our side-by-side code difference viewer. In LiveCompare 3.8 the view is improved simply because we are using the new code difference viewer based on Monaco.

But there’s more.

Users have long wanted to be able to explore individual methods – useful as classes grow. In LiveCompare 3.8 this is now possible.

Expanding Methods shows:

I can see the four methods. Status icons help me quickly focus on the changes: 1 method is different, 3 are unique to one of the versions (in this case these are new methods because I compared “active” with “old”).

Selecting a method shows:

Note: this is still pre-release so don’t worry about the lack of ABAP syntax highlighting, this’ll be fixed by the time we release.

To make it easy to switch to SAP’s development tools, the header for the selected component shows that SAP version numbers that were compared:

LiveCompare compared the active version – 0000 – with version 0001. Here’s the view from S24:

Expanding all the branches of the class shows:

Once again, the comparison status icons make it easy to focus on what’s changed between the versions.

Conclusion

Classes are complex objects when it comes to versioning. A class is made up of several independently versioned components which make it challenging for developers to compare a class between two points in time.

LiveCompare addresses this challenge by:

  • Using transports as a proxy for identifying points-in-time when some aspect of the class changed.
  • Automatically selecting the “active” versions of the components based on selected points-in-time.
  • Presenting a logically complete view of the class based on selected points-in-time
  • Providing side-by-side class comparison with component drill-down
  • Cross-reference SAP component versions to simplify switching between SAP development tool and LiveCompare

From the LiveCompare 3.8 previews I’ve given, this is the most wanted feature from developers.

Are you a developer? Do you agree?