ABAP in Eclipse

July 2012 Previous month Next month

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:

local_history_prefs.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:

call_local_history.png

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

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

compare_local_version.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:

compare_editor_buttons.png

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

restore_local_version.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:

call_revision_history.png

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

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

compare_revision.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

call_cross_comparison.png

and browse through the highlighted differences or changes in the source code:
cross_comparison.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.

When you've already installed ABAP in Eclipse (AiE) then you know what a hassle it is to get all the pre-requisites installed by manually searching them. But there is a way to improve this step. Eclipse allows you to install Software Items from a File. I've created the needed P2F files and provided them on this SCN Wiki Page:

 

AiE easy installation

 

So now you can just go ahead, download the file matching your Eclipse version, install the pre-requisites and then you're ready to go and install ABAP in Eclipse. ABAP in Eclipse can be downloaded here.

 

Hope you like this new and easy way to get ABAP in Eclipse installed.

Since the announcement of availability of ABAP Eclipse to enable developers to use Eclipse environment for development, i was quite excited to install and have a look at this new tool. But installing and making it to function took me through lot of hurdles, though the SAP documentation provides the details but its not in detail and the steps are not that clear.

 

I am pretty sure others in the community will have the same kind of difficulties unless they have used eclipse earlier and so on.. This blog helps ABAP developers to get through the installation part.

 

Requirements:

Operating System Windows XP, Vista, 7 (32- or 64-Bit)

Java Runtime JRE 1.6, 32-Bit

MS VC Runtime 10, 32-Bit

SAP GUI for Windows 7.20 Patch Level 9 or higher

Browser Internet Explorer 7.0 or higher / Firefox 4.0 or higher

Eclipse Platform Eclipse 3.6 or 3.7

 

1) Download Eclipse software from the below website (Supported versions 3.6.0 to 4.0.0 ) Versions above 4.0 are not supported with ABAP editor, make sure the right version is downloaded.

http://download.eclipse.org/eclipse/downloads/eclipse3x.html

2) Downloaded file is a zip file, and unzip the file in the location you want to and the Eclipse is ready to be executed using .exe file.

3) JRE (Java Runtime Environment) is mandatory to run the eclipse and thus make sure the JRE with version above 1.6, 32 bit (Latest version also does)

4) Download the other enhancements required to support ABAP editor installation from the links mentioned below

EMF-Eclipse Modelling Framework Core Runtime

http://www.eclipse.org/downloads/download.php?file=/modeling/emf/emf/downloads/drops/2.8.0/R201206080554/emf-runtime-2.8.0.zip

or

http://www.eclipse.org/modeling/emf/downloads/?project=emf – Choose the component EMF (Core) and download the runtime file

EMF-Edit Data Binding (Model Query)

http://www.eclipse.org/downloads/download.php?file=/modeling/emf/query/downloads/drops/1.6.0/R201206271200/emf-query-runtime-1.6.0.zip

 

Or

http://www.eclipse.org/modeling/emf/downloads/?project=emf – Choose the component Model Query and download the runtime file

EMF-Validation Framework

http://www.eclipse.org/downloads/download.php?file=/modeling/emf/validation/downloads/drops/1.6.0/R201206271200/emf-validation-runtime-1.6.0.zip

Or

http://www.eclipse.org/modeling/emf/downloads/?project=emf – Choose the component Validation framework and download the runtime file

EMF-Model Transaction workbench Integration

http://www.eclipse.org/downloads/download.php?file=/modeling/emf/transaction/downloads/drops/1.6.0/R201206271200/emf-transaction-runtime-1.6.0.zip

Or

http://www.eclipse.org/modeling/emf/downloads/?project=emf – Choose the component Model Transaction and download the runtime file

Mylyn Commons

http://www.eclipse.org/downloads/download.php?file=/mylyn/drops/3.8.0/v20120612-0600/mylyn-3.8.0.v20120612-0600.zip

Or

http://www.eclipse.org/mylyn/downloads/ - Select Mylyn Commons and proceed to download

Mylyn Task-Focussed Interface

http://www.eclipse.org/downloads/download.php?file=/mylyn/drops/3.8.0/v20120612-0600/mylyn-3.8.0.v20120612-0600.zip

Or

http://www.eclipse.org/downloads/index_project.php - Select Mylyn Tasks and proceed to download

ABAP eclipse files

SAP service market place (downloadable files are Under independent of OS option)

 

5) Downloaded files are zip files unzip them to make them ready for importing into Eclipse

6) Open the Eclipse (use Eclipse.exe file in the downloaded software from step 1)

7) Go to Help->Install New Software

1.png

8) Click on the Add button and then click on the Local button from the pop up window. Browse the folder where the enhancement features downloaded are unzipped and choose the “Eclipse Modelling Framework Code runtime” folder for installing.

2.png

 
 

 

9) Ensure that “Group item by Category” is unchecked and choose the right component from the list and install on the next button.

 

 
3.png

 

The following popup will be shown, click on Next, if you don’t have the right version, right selection of the feature then you will end up in errors.

 

  4.png
 

 

Read through and accept the license agreement.

5.png

Ensure that the Eclipse is restarted after every installation else you will not be able to install the further enhancements.

  6.png
 

 

10) Repeat the steps for the other enhancement installations and make sure that right component is chosen to be installed as shown below and in the same order and restarting is mandatory after each installation. 

7.png8.png9.png

10.png11.png12.png

 

11) Maintain the SAP logon pad with the system you are trying to connect (Development system). And ensure the SNC is activated and No Single sign on is checked if u r not using SSO.

13.png

12) Ensure your user has the following roles assigned.

SAP_BC_DWB_ABAPDEVELOPER ABAP developer

SAP_BC_DWB_WBDISPLAY Display authorization for ABAP

13) Ensure that services are activated in transaction SICF.

Procedure

1. Call the transaction SICF in the relevant back-end system.

2. As a filter, select DEFAULT_HOST for Virtual Host entry. Then press F8 or use the

corresponding toolbar icon to display the services tree.

3. Expand the node default_host > sap > bc > abap.

The subtree displays the service items docu and ToolsDocu.

4. Select the service docu and choose Activate Service from the context menu.

5. Repeat the last step for the service ToolsDocu.

6. In addition, expand the link node in the public subtree default_host > sap > public > bc > abap.

7. Select the link node docu and choose Activate Link from the context menu.

8. Repeat the last step for the link item ToolsDocu.

14) Now you should be ready for connecting to SAP. Go to the menu, File->New->Create Project, in the popup window select the ABAP Project under ABAP folder and click on next

  14.png
  15.png

 

15) Browse and choose the right system using Browse button and the click on Next.

 
16.png

 

16) Mention the client, user, pwd and then click on next/finish.

17.png

 

17) Congratulations,you are now ready to work with Eclipse to build ABAP objects.

 

Hope this helps all of us to get started with new ABAP Development Tool.

Looking at several posts and comments there seems to be a lot of confusion about which SAP NetWeaver release is compatible with the new ABAP Development Tools for SAP NetWeaver (ADT). And I completely agree, it's not that obvious that the version of some core components differs from the corresponding SAP NetWeaver release identifier.

 

Coming back to the compatibility of ADT the most important components are the ABAP language, the ABAP runtime environment and the development infrastructure. ADT requires at least an AS ABAP with SAP Kernel 7.20 and SAP BASIS 7.31 with support package stack 04. This can easily be checked using SAP GUI:

 

Navigate in the menu to System -> Status and click on the Component Information button:

component_information.png

After verifying the SAP BASIS release close this window and hit the Other Kernel Info button:

kernel_information.png

 

Now, which SAP NetWeaver releases include an AS ABAP containing these component versions? The answer is:

The following SAP NetWeaver releases (onwards) are compatible with ADT:

 

I hope this clarifies most of the questions regarding the compatibility of ADT.

The Story

Maybe you already heard of ABAP in Eclipse (ABAP Development Tools) or even visited the space here on #SCN http://scn.sap.com/community/abap/eclipse, then you're ready to take the first step into a new way of coding.

 

1 or 2 years ago I noticed there is an idea (or even the actual development) of abap in eclipse but I thought about the problems that come with such an idea, but I hoped SAP would not drop this and get us a new base for developing ABAP coding.

 

A few days ago I read about the release of the ABAP-Eclipse Plugin and started with the FAQ http://scn.sap.com/docs/DOC-29113 to get an overview of this tool. At this time I sadly had no installation of netweaver 7.03 SP4 available, which is a requirement to try out AiE.

 

The Installation

But yesterday evening the netweaver trial 7.03 was released and available on SCN . So I started the download http://www.sdn.sap.com/irj/sdn/index?rid=/webcontent/uuid/1024acfb-5b30-2e10-f2bd-ccce5d8692b1 and installed the new netweaver trial on my laptop. The installation was quite as easy as already with the netweaver trial 7.02.

 

Afterwards I started the download of ABAP in Eclipse on the SAP Marketplace (search under Support Packages and Patches for "ABAP Eclipse") and downloaded the ~23MB ZIP-File and the eclipse platform from here http://www.eclipse.org/downloads/packages/eclipse-classic-372/indigosr2

 

To put it all together I followed the information of SAP Note 1718399 which comes with an installation manual in .pdf format and helps you to get it all started.

So I could finish my day with an first glimpse at the new dev tool. My tasks for the next days are to explore all it's features and maybe missing things which I know from SE80. But as I think SAP is doing the right thing to provide us a new "workbench" for developing, at least have a look at the navigator after your installation, the view of classes, their methods and attributes and I hope you like it as much as I do. (even the multiple tab thing :-) )

 

At least there is already a nice quick reference card for abap in eclipse, thanks to the creator(s).

http://scn.sap.com/community/abap/eclipse/blog/2012/07/02/adt-quick-reference-card

 

The End

I'm very eager to explore all the features and possibilities of this tool and I hope I could give you a short impression how easy it is to try it yourself.

So stop reading here and move on to the space and get started >> http://scn.sap.com/community/abap/eclipse

 

project_explorer.jpgtabs.jpg

Can't remember a specific keyboard shortcut for SAP's new, Eclipse-based ABAP IDE? This reference card helps you to be more productive by listing the most important keyboard shortcuts of the ABAP Development Tools for SAP NetWeaver.

 

If you are still missing a specific keyboard shortcut, just use the mother of all keyboard shortcuts 'Ctrl+Shift+L' to list them all or define your own ones in the Eclipse preferences (Window -> Preferences -> General -> Keys).

 

Remark: This PDF version of the ADT Quick Reference Card is scaled for printing in postcard size (DIN A6). For best printing results please activate the 'print on both sides' and the 'flip pages option' of your printer (if available).action_64.png

Click here to download the ADT Quick Reference Card