01-02-2016 12:04 PM
Hello,
How can I compare two different reports or classes in Eclipse?
It's easy to compare a single report's version history or with a copy in another system, but the option to compare ZREPORT1 and ZREPORT2 is somehow not available or hidden.
Am I missing something obvious? I couldn't even find anyone else asking this question...
Regards,
Mike
01-05-2016 7:50 PM
Isn't there an Eclipse plug-in for comparison of two files?!?!
Also found this...
01-02-2016 12:51 PM
HI Mike,
I haven't tried in Eclipse but exporting with SAPlink or abapGit and comparing then using a diff tool should work quite nicely.
Best regards
Gregor
01-02-2016 1:31 PM
Hi Gregor,
Thanks, but if I'm going to go that route then surely a simpler hack is to do it all within Eclipse: generate a new version, paste the other code over the one I'm comparing against, and do a version comparison
Still more hassle than just using SE39, was hoping to use the tool that already exists in ADT.
Regards,
Mike
01-05-2016 1:42 PM
Mike,
To compare any two files in Eclipse, select them in the Project Explorer/Package Explorer/ Navigator with control-click. Righ-clic on one of the files. You'll see a context menu appear. When you do, select Compare With/Each Other. If you're on a different version of Eclipse than I, and the option "Each Other" doesn't appear in the menu "Compare with", go to Preferences>Capabilities>Advanced and enable Team> Core Team Support, then restart Eclipse.
01-05-2016 7:00 PM
Hi Paula,
Thanks for the input. I had already tried the multi-select but all I get is Compare with... "New Project" / "Revision History".
I can't see the option you're talking about, using Eclipse Mars on OSX all with latest updates installed.
My config:
No Core Team options, and I've gone through all the ABAP and General > Compare options.
Thanks & regards,
Mike
01-06-2016 4:11 AM
Mike,
Take a look at a reference I found online with a screen shot-- let me know if you see something similar in the context of the file versions you want to compare.
01-06-2016 11:27 AM
Hello Paula,
Thanks for the info, no I do not have this option available for ABAP sources. Do you see it on your installation, and what version are you using?
Regards,
Mike
01-05-2016 7:50 PM
Isn't there an Eclipse plug-in for comparison of two files?!?!
Also found this...
01-05-2016 10:20 PM
Hi Christopher,
Thanks, are you referring to two disk files? That could be compared easily, but because ABAP sources don't live on the local drive, a native comparison would have to be specifically provided by ADT.
Sure a download and compare of text is feasible, but as per my answer to Gregor, it's not worthwhile if it's more effort than alt-tabbing over to an SE39 compare in the SAPGUI.
It just strikes me as odd that ADT provides a quick and useful tool to compare versions but not alternate reports...
Thanks & regards,
Mike
01-06-2016 1:55 PM
Seems odd to me too. You would think this "feature" would be high on the list as "most needed".
01-06-2016 2:24 PM
Actually, ABAP sources are cached on the local disk and therefore the built-in comparison feature can already be used - there is currently some additional work needed. Let's see if this will be improved in the future...
This also works with all other source code-based ABAP development objects, e.g. classes, DDL sources, interfaces etc. You may even compare classes with reports etc. The only thing you need to do is find the proper folder where the cached files are located and select the correct file (there are header and content files).
01-07-2016 7:06 PM
Hi Sebastian,
Excellent, still a bit of a hack but definitely workable. Not sure if it's by design, but things like F3 navigation doesn't work. But that's also reasonably easy to get around.
By the way I did have a go to see if it could be used to do offline editing or at least viewing, but no joy. This would be a nice feature too...
Thanks & regards,
Mike
01-13-2016 11:44 AM
Hi Sebastian,
There is something one should know about the "Cache Navigator workaround". Do not try to merge or copy differences between the cache files from the compare editor. Most of the time these files are not writable but chances exist that you may have opened and already changed one or both of them in native ADT editors. In this case the SFS cache files are opened for writing also and changing them directly may destroy your cache consistency. So consider this approach as "look but don"t touch" one 🙂
Best Regards,
Mario
07-01-2023 11:16 AM
The compare with each other function is now available for ADT is well.
Simply select two objects such as two programs or classes in the project explorer.
Right click on the selected objects and choose "Compare with" --> "Each Other".
I have tested this on 750 with the latest ADT released for customers.
07-01-2023 12:57 PM
Heck yeh! Don't just let a post from 2016 die! Raise that zombie back up! Great job!
07-02-2023 8:41 AM
Thanks. Same remark about 2016. I guess it's ADT 3.34. I hope there will be a short blog post about it with screenshots of comparison. I hope it's not the ugly comparison view of old program RSVRSRS3 😉