Today SAP released the new support package 05 for NetWeaver 7.4. I’m very happy to announce that also a new version of the ABAP Development Tools for Eclipse is generally available on the SAP Service marketplace (valid S-user required). Just navigate to the SAP Software Download Center and ‘Search for Software Downloads‘ using the keywords ‘ABAP Eclipse‘. This time you will find 2 versions of 2.19. The version 2.19_Juno is in case you want to use the older eclipse version Juno. But we recommend to move to Eclipse Kepler. A detailed installation guide is available as attachment of https://service.sap.com/sap/support/notes/1950493 .
You will find the new packages ADT 2.19 also on our SAP tools update site: SAP Development Tools for Eclipse
The new version comes along with a bunch of bugfixes and for sure with a nice set of new features.
The new features are available with NW 7.4 SP05 and we managed to downport most of them also to NW 7.31 SP11.
A general overview about the Feature availability matrix of ADT you can find in this blog:
So let’s have a look on the new cool features of ADT 2.19:
- Quickfixes for creating function modules and includes (7.4 SP05 + 7.31 SP11)
- Generating constructor methods for ABAP classes (7.4 SP05 + 7.31 SP11)
- Easily create attributes and parameters for ABAP classes in the eclipse editor (7.4 SP05 + 7.31 SP11)
- Creating bookmarks via the project explorer (7.4 SP05 + 7.31 SP11)
- Displaying enhancement implementations in the eclipse editor (7.4 SP05 + 7.31 SP11)
- Watchpoints in the Eclipse Debugger (7.4 SP05 + 7.31 SP11)
- Edit internal tables in the debugger (7.4 SP05 + 7.31 SP11)
- ABAP Codesearch
- News from the Web Dynpro Tools (7.4 SP05 + 7.31 SP11)
- Editor for Dictionary Views
- Defining Database Procedures in ABAP classes
- Data Preview
Quickfixes for creating function modules and includes (7.4 SP05 + 7.31 SP11)
A very often used functionality in the ABAP workbench is the possibility to create new development objects just by double-clicking on the object name in the editor. In case the object does not exist the creation wizard comes up and you can define the object.
In Eclipse we support this functionality via the Quick Fix action. For classes and interface this functionality is already available a while ago. Now we support also the creation of function modules directly from the source code editor:
And the creation of includes in the editor is also supported:
Generating constructor methods for ABAP classes (7.4 SP05 + 7.31 SP11)
A very helpful new function of the ADT is the possibility to generate constructor methods via the Quick Fix functionality. Just position you cursor on the name of the class within the eclipse class editor and press CTRL-1 (Quick Fix). The tool provides you the following options:
- You can create a class constructor
- You can create an instance constructor
- You can create a static factory method
In case you create an instance constructor or a factory method the tool asks you which attributes you want to initialize in the implementation. Therefore a popup comes up where you specify the attributes.
Once you did that and press “Finish” the editor creates the definition of the constructor method for you including the input parameters based on the attributes you have chosen. Also the method implementation is generated into your code:
Easily create attributes and parameters for ABAP classes in the eclipse editor (7.4 SP05 + 7.31 SP11)
Now it is possible to very easily create new attributes for classes by using the Quick Fix action of the eclipse editor. So let’s assume you are implementing a new method and you need a new attribute for the class. In that case you just enter the name of the attribute in the editor and press CTRL-1 (Quick Fix). The tool now detects which actions make sense for that source-code position and offers these options in a small popup:
When you choose the option “Declare attribute …” the editor creates the data declaration for you in the private section of the class. In case you want to change the visibility of the attribute to public we offer an additional Quick Fix on the declaration of the attribute to change the visibility:
Another Quick Fix function which is offered with ADT 2.19 is the possibility to add new parameters to a method. So let’s assume you are implementing a method and you need a new importing parameter or you want to add a returning parameter. Again you position the cursor on the name of the parameter in the editor and click CTRL-1 (Quick Fix). Now you get additional options in the popup:
When you choose “Declare importing parameter…” the editor adds the parameter to the signature declaration. We also have a small video for you on Youtube that will show you these features live in the system: Refactoring with ABAP in Eclipse – YouTube
Creating bookmarks via the project explorer (7.4 SP05 + 7.31 SP11)
You can now add bookmarks to any ABAP artifact via the eclipse project explorer. To add a bookmark, select the artifact in the project explorer, and choose the context menu “Add Bookmark” and give a name of your choice:
This ABAP artifact is now listed in the eclipse bookmarks view and you can easily open the editor by double-clicking on this artifact at any point in time.
Displaying enhancement implementations in the eclipse editor (7.4 SP05 + 7.31 SP11)
With ADT 2.19 we now also support the display of enhancement implementations in the eclipse editor. In contrast to SAP GUI the source code is not merged in the source code of the enhanced object but all implementations are indicated by a marker in the editor’s ruler. You may know the icon of the marker already from the workbench.
To display the source code of the source code plug-in you just need to hover over the marker in the editor’s ruler. A small window comes up and displays the code and also some metadata like the name of the enhancement and the activation state.
Currently, we support all kinds of source code plug-ins in classes, programs and function groups:
- explicit: at statements ENHANCEMENT-POINT or ENHANCEMENT-SECTION
- implicit: e.g., begin and end of a method, function module, sub routine or the end of an include
For sure this is only a starting point. In future releases we will also better support the editing of enhancements in eclipse.
Watchpoints in the Eclipse Debugger (7.4 SP05 + 7.31 SP11)
With ADT 2.19 we also enhanced the featureset of the ABAP debugger in Eclipse. When debugging ABAP code, you can now use watchpoints to track the value of individual ABAP variables. The ABAP debugger stops as soon as the value of a watched variable has changed. In a running debug session use “Set Watchpoint” in the context menu of ABAP source code editor or in Variables view.
Furthermore you can specify conditions for watchpoints. The runtime environment checks whether this condition is fulfilled and only in that case the debugger stops. The condition is specified within the breakpoints view where also the watchpoints are listed. After you have entered the condition don’t forget to save the changes with the save button of the eclipse IDE !
When the condition is fulfilled the debugger stops and you can see the related source-code line with a specific watchpoint icon.
Edit internal tables in the debugger (7.4 SP05 + 7.31 SP11)
Another heavily requested feature in the eclipse debugger is the possibility to manipulate internal tables in the debugger variables view. With ADT 2.19 we support now insert, change and remove lines from internal tables within the debugger. When you are in the debugger you can double-click on an internal table in order to see the content in the ABAP internal table viewer:
When you right-click on a cell in the table view you find several options to manipulate the table:
- “Change value…” allows you to change the value of the field directly in the table (You can also use shortcut F2)
- “Insert Row…” allows to insert or append a new row into the table
- “Insert Row from Selection” allows to insert or append a new row into the table based on the values of the selected row
- “Delete Selected Rows” allows you to delete rows from the internal table (You can also use the shortcut Delete)
- “Delete Rows…” allows you to delete a range of rows from the internal table
- “Show in Variables View” allows you to display the content of the table cell in the variables view
- “Go to Line” allows you to set the table selection into a specific table line.
- “Export to File” allows to export the whole table into an Excel file
Searching within source code was up to now nearly impossible with the ABAP development for Eclipse. The only offered solution was to search within one editor tab via CTRL-F. But what about searching the whole source repository in a few seconds for a specific code fragment or comment? With SAP HANA we now have the possibility to provide such a service also for you as an ABAP developer in Eclipse. With ADT 2.19 and NW 7.4 SP05 we offer you a new search capability that searches the whole source code repository for a given code fragment. In the following example we want to find all places in the code where we select for entries in SFLIGHT table. In order to do so you just open the standard search dialog in ABAP in Eclipse via CTRL-H or via the related button in the toolbar and choose ABAP Source Search:
This will open a dialog where you can enter the search string. You can also specify the number of maximum hits and the ABAP project for which you want to start the search:
After pressing the Search button the results will be displayed in the eclipse search view:
In the result list you already have the possibility to display the code snippet that belongs to the hit.
In addition you can also open the complete source-code editor just by double-clicking the entry in the list.
News from the Web Dynpro Tools (7.4 SP05 + 7.31 SP11)
With ADT 2.19 we also added a lot new features in the area of Web Dynpro and Floorplan Manager. Please find all the details in the blog New Features in ADT 2.19 for Web Dynpro ABAP development from my colleague Raghuvira Bhagavan
Editor for Dictionary Views
Following SAP’s paradigm shift in the way business applications are developed and executed, SAP NetWeaver 7.4 SP05 provides enhanced view building capabilities to enable developers to easily define semantically rich data models in the database. The new view building features are delivered in the context of the Core Data Services (CDS) support in ABAP. They include new join types (LEFT OUTER JOIN, RIGHT OUTER JOIN), clauses (UNION, UNION ALL, HAVING, GROUP BY) as well as support for aggregate functions (SUM, MIN, MAX, AVG, COUNT), SQL functions (SUBSTRING, MOD, CEIL, LPAD), literals, CASE statements, arithmetic expressions, cast expressions and path expressions using associations. All these new features are “open” so that developers can optimize their applications on any underlying database supported by SAP. The views can be used in OPEN SQL statements.
The enhanced view building features are provided in a new text editor for DDL Sources in ADT allowing developers to take advantage of the many source-based tools such as syntax highlighting, code completion, element info, error markers, etc. An extensive F1-help is also integrated into the text editor.
You create such a new view like every other ADT object via the Eclipse menu File->New->Other->DDL Source:
When pressing “Finish” an editor comes up where you can enter the definition of the view in a textual way.
Here you see an example of such a new view in the DDL editor in Eclipse:
Or just have a look on that video tutorial:
Defining Database Procedures in ABAP classes
In order to utilize the full performance potential of HANA in scenarios of mass-data processing it is advisable to use database procedures to achieve higher performance gains. The implementation language SQLScript for database procedures shares concepts like table-like parameters and internal tables known from the ABAP world.
Starting with release 7.40 we offered the first step in using database procedures in ABAP with:
- Database procedure development in HANA studio
- Support for generation of a database procedure proxies in Eclipse
- Invocation of a database procedure via the ABAP statement CALL DATABASE PROCEDURE
Although this is a rather powerful approach the development process is not optimal.
With NW 7.40 SP5 we now offer a solution where the development of database procedures is completely integrated into the ABAP development environment. Intentionally we have chosen ABAP classes as carrier for database procedure code. This means you can just tag class methods with the addition “BY DATABASE PROCEDURE” indicating, that this method is actually a database procedure and executed in the HANA engine. The main benefits are:
- Integrated syntax-check (for active code and inactive code versions)
- Syntax-coloring according to the SQLScript grammer
- Background shading of SQLScript to better indicate the “language switch” from ABAP to SQLScript
- Reuse of global ABAP types (e.g. tables, structures) in the procedure definition
- Some (but not all) functionality of ABAP-OO, like visibility (public/private), friends, interfaces
With the next SPs, we will continue on this topic trying to improve ABAP on HANA development further on.
Please have a look on that video tutorial:
One of the most often used transactions in an ABAP development system is the transaction SE16 – The Data browser. With ADT 2.19 we now provide a similar tool for eclipse to display the content of views and tables. You can start the tool from the eclipse project explorer by right-clicking on the name of a database table or a database view:
By choosing the menu item ‘Open Data Preview’ a new eclipse view will be opened where you see the content of the table.
In this view you have several options to configure the display and to filter the selected data. Details can be found in the blog Introducing Data Preview in ADT 2.19 from my colleague Raghuvira Bhagavan We also have a small video on youtube for you: Data Preview within ABAP in Eclipse – YouTube
Now have fun with the new features.
Merry Christmas and a Happy New Year.