1 2 3 15 Previous Next

ABAP in Eclipse

223 Posts

Do you know this situation: You are working on a development object in your eclipse IDE and you want to know in which transport request this object is locked. For sure the AIE transport viewer is the tool of choice in that case:

28-01-2016 12-52-26.png


In the transport viewer you see all your transport requests and all the objects that are locked within these request.

BUT: In case you have a lot of requests in that list you have an issue. Because you have to open all folders in order to manually do the lookup for the object you are interested in. This takes you a while and you are frustrated about the tool. 

STOP: Why not use the Filter line on top of the view? Just enter the name of the object (or parts of it) and the tree automatically opens the correct folder and you immediately see the request where the object is locked. This makes you happy again.


I think this is a very helpful feature !

Have Fun.



This article could be helpful for you if you are an ABAP developer using ABAP Development Tools (ADT) and you experience one of the following scenarios:

  • Your ADT breakpoints are decorated with small red crosses and you get messages telling you that there is a breakpoint activation conflict
  • You want to debug for a group user (means multiple persons using the same username and password in parallel, e.g. support user or technical group user).
  • You switch between ADT and SAPGUI Debugger (with external breakpoints) for the same system, client and username
  • You use multiple ADT projects for the same system, client and username in parallel


The intention of this article is to provide a basic understanding about the specialty of these situations and to show what possibilities ADT offers to deal with them. If you have issues with mass requests and you get too many debug sessions in a short time you can directly go to the section "Mass Requests".


ADT Breakpoints and External Requests


When using SAPGUI you have to deal with three different kinds of breakpoints (debugger breakpoints, session breakpoints and external breakpoints). Now with using ADT things become much easier as there is only one kind of breakpoint for all purposes. In ADT you just create a breakpoint and by default it can be used to catch any request for the current user, including external requests like RFC or HTTP.



Once a request hits a breakpoint a new debug session will be started and the project that was used to create the breakpoint will be the owner of this session, regardless where the request was started from.


Activation Conflicts


ADT breakpoints are easy to handle and work well for 95% of all debugging scenarios. But in some cases like the ones mentioned (group user, multiple IDE case, etc.) things are a bit more complicated. In these cases there are multiple ADT projects / IDEs / persons claiming to debug the same requests (identical system, client and user). The question is now which ADT projects becomes the owner of upcoming debug sessions? This is what we call activation conflict.



Remark: Above is mentioned that projects claim their "right to debug" by creating breakpoints. But the debugger should also work in some other situations, e.g. at the statement "break-point". Therefore an ADT Project claims debugging rights already during system logon and conflicts can also occur if no breakpoints are present.


So what's the solution? Who will be the owner of the debug session?


Before NetWeaver 7.50 it is the project that was most recently used to create a breakpoint (or most recently used to execute the menu action "Refresh Breakpoint" / "Refresh Breakpoint Activation").


Starting with NetWeaver 7.50 there is an integrated conflict handling available for these situations that makes conflicts obvious and offers options to deal with it. Additionally there is a new debugger setting that can be used to avoid conflicts completely at the price of a reduced breakpoint validity scope.


Conflict Management


As long as only one ADT project claims debugging rights for a certain set of requests everything is ok. Once a second project also claims debugging rights for the same requests this is recognized and the second project will change its debugging status to "suspended" while the first project stays unaffected. Within suspended projects all breakpoints are immediately decorated with small red crosses and corresponding texts:



Projects in suspended state cannot be used for debugging at all. But it's easy to reactivate debugging within a suspended project, although this will suspend the currently active project in return.


To reactivate a suspended project and suspend the currently active one you can perform one of the following actions:

  • Open the context menu on any breakpoint or the vertical bar where you usually place breakpoints and choose "Refresh Breakpoint Activation"


        To reactivate debugging for yourself (including suspension of someone else) you have to choose "Continue" on the confirmation popup


  • Alternatively create a new breakpoint and choose "Continue" on the confirmation popup


The debugger suspension will cause an information popup in the first project:




Now the first project is suspended and therefore offers the chance to reactivate debugging including the suspension of the currently active project (= now the second project).


Currently running debug sessions are not affected. Even if someone else suspends you while you are debugging you can go on as usual. To remember: The above conflicts are regarding the question who will be the owner of newly upcoming debug sessions.


Additionally you will be warned when you are about to change your debug settings in a way that would cause a conflict. For example if you try to debug the requests of one of your colleagues while he is currently working with his user on his own PC / IDE.




Project Debugging Scope


In case you are not interested in external HTTP and RFC requests but only in the requests that are triggered from your own eclipse project (embedded SAP GUI, ABAP Unit) you can also reduce the validity scope of your breakpoints. There will be no more conflicts at all, but you won't be able to debug external HTTP or RFC requests anymore. Additionally nobody else will be able to catch the requests that are fired from your project.



To reduce the breakpoint validity scope you can enter your project properties, navigate to ABAP Development -> Debug and choose "This project only".




Conflicts between ADT and SAPGUI external breakpoints


The conflicts that can occur between SAPGUI and an ADT project are conceptual similar to the conflicts between multiple ADT projects:



But there are also some differences. Once an external breakpoint is created in SAP GUI all active ADT projects that are aiming for the same requests will be suspended. There is no further confirmation popup within SAP GUI. Also vice versa ADT projects do not take SAP GUI external breakpoints into account and suspend them without any further confirmation during the creation of an ADT breakpoint or a similar action (breakpoint refresh, system logon).


The improvement of NW 7.50 compared to lower releases in this case is that you can easily see within ADT that your project has been suspended.


Mass Requests


If you have to debug a code position that is executed very often, like one time per second or even more often, then you probably have the problem of too many debug sessions. This is independent from the above explained conflicts but can also be caused by the work with group users, e.g. if you have a web application that uses a shared technical group user:




In some situations debugging with terminal ID can be useful for this problem. But for tagging HTTP requests with the terminal ID you need to start your browser via the SAP HTTP Plugin for IE (refer to SAP note 1041556), which is also not suitable for some situations.


What you can do instead:

  • Use a conditional breakpoint to specify the wanted request(s) more precisely
  • Try to create the breakpoint at a code position that will be reached by the wanted request but not by each and every request
  • Activate your breakpoint only for the short time when you expect the wanted request and deactivate or delete it when the debug session has been started


Once you have a running debug session for your wanted request it's easy to go on by using soft breakpoints. These can be used like normal breakpoints in running debug sessions but will not start new debug sessions.



Many of us have improved development speed by using several custom code templates in SAPGUI Editor. And me too, of course.



So, when I started working in Eclipse, I was strongly missing my usual templates.

Of course, I could copy all the templates from SAPGUI to Eclipse manually, one by one. But manual uniform repeating action offends real programers

So I have created ABAP program, which display a list of all custom SAPGUI templates, and allows you to copy selected (or all of it) to Eclipse.





To install program you need to import SAPLink nugget in attachment (you should change extention from .xml to .nugg).

(The program have been created in system with SAP_BASIS 702 SP11)

User’s manual




2) The list of all custom templates from file abap_user.xml will be displayed.



3) You can select individual lines to copy only selected templates or copy all templates. To copy all templates you don’t need to make any selection. (The program will ask you to confirm)


4) Press “Copy to Eclipse”.

If you haven’t selected any line, you’ll see the confirmation



5) Next, the dialog for choosing Eclipse workspace folder will appear.

Choose workspace folder of required Eclipse installation.

(It can’t be defined programmatically because you can have several Eclipse installations)



6) That’s all



7) Now let’s check the results.

Start Eclipse (or restart, if it is already running) and check Templates



Exactly what we need!


That’s all.

I hope this small tool will be helpful


Best regards,



The immense potential of the Core Data Services (CDS) semantic data layer is aware to all of us. The CDS graphical editor complements this potential by representing CDS entities and their relationships in a graphical form.


As an architect or an application developer, you know the difficulty in comprehending complex source codes either developed by you or your colleagues. Every time before you engage in a technical discussion you need to have a relook at the implementation for an effective engagement.


The CDS graphical editor takes care of this gap and brings you up to the speed in a shorter span. The graphical view enables you to have implementation discussions between project stakeholders without detailed explanation of concepts and relationships as they are self-explanatory.


The graphical view is a read-only view. To make changes to the CDS entity, you need to access the source code editor. Graphical editor enables you to directly navigate to the source code editor and make the required changes.


The CDS graphical editor is available in ABAP-in-Eclipse development environment with ABAP Development Tools version 2.51 in SAP NW 7.5 SP00.


Access Graphical Editor


  1. In Project Explorer, navigate to the required ABAP package.
  2. Navigate to the DDL text editor.
  3. Choose a DDL text editor.
  4. In the context menu, choose Open with Graphical Editor.

       The graphical editor appears on the right and provides a graphical display of the entity as described in the DDL text editor.


CDS Graphical Editor Features

In the graphical editor, you can use any of the following options to see the source code of an entity:

  • Double-click the object
  • Use context menu of the object





Updating the Entity in the Graphical Editor

You can edit the source code in the text editor. Changes made in the text editor appear immediately in the graphical editor. Syntax errors appear as parse error in the object where the error occurred.







Opening text editor

Choose the object and from the context menu, choose Open DDL Source Editor to view the text editor.






Where-Used feature

This feature enables you to view the usage of a user-defined type within the DDL source. Choose a user-defined type and from the context menu choose the option "Highlight Used Column". The user-defined type appears highlighted.






Browsing Data Model

If the data model is large such that not all the objects are visible in the drawing pane at once, you can use the Miniature View to browse the data model. Press CTRL + 3 on the keyboard and enter Miniature View in the field.





Auto Layout

The graphical editor positions the objects in the editor automatically. You can manually change the position of the objects but these positions are not persisted. The next time you open the DDL source the graphical editor lays out the position of the objects automatically. In the context menu of the graphical editor, choose Auto Layout.






Printing and Exporting

You can print or export object diagrams using the Print or Export Diagram options available in the context menu of the editor.



The table below displays the graphical representations of entities with its description:



Graphical RepresentationDescription
entity_icon.pngThis symbol represents an entity.
key_element_icon.pngThis symbol represents a key element in an entity.
element_icon.pngThis symbol represents elements in an entity.
association_icon.pngThis symbol represents an association in an entity
user_defined_type_icon.pngThis symbol represents a user-defined type.
association_line.pngThis symbol also defines an association. The directed line indicates the relationship between entities.The association name appears on the line. The line also displays cardinality if you have defined a cardinality for the association.
inner_join.pngThis symbol represents an inner join.
left_outer_join.pngThis symbol represents an outer join.
union_icon.pngThis symbol represents a union.

ABAP in Eclipse now offers eclipse native editor support for Web Dynpro ABAP(WDA) Component and Web Dynpro ABAP Application.


In the project explorer, right-click on the object or double click to open WDA Component or Application in the eclipse editors. You can also use the shortcut ctrl + shift + A to search and launch the WDA Component or Application editor.


Web Dynpro Component Editor:


Web Dynpro Application Editor:


To test any WDA Application, click on the hyperlink "URL" and the application is launched within Eclipse in the pre-configured browser.

SAP NetWeaver AS ABAP 7.5 delivers many new features in the area of ABAP Core Data Services (ABAP CDS). In addition to the new CDS language features there are also many new CDS tools in ABAP in Eclipse. Here is a short overview of some of the tooling highlights.


Project Explorer


If you’re looking for your DDL sources in 7.5 you will now find them in your ABAP package under Core Data Services > Data Definitions. The CDS objects have been re-organised in the Project Explorer to make accessing your objects easier.




Code Completion


Code completion in ADT and in the context of the CDS text editor is certainly nothing new. What is new is that you can now insert all the elements of the data sources into the select list of your CDS view definition with one completion. Trigger the code completion with CTRL+SPACE and choose “Insert all elements”. In addition to the fields, any public associations defined in the data sources are also added to the select list. The completion takes into consideration all data sources, including the joined data sources. After the insertion you can easily delete individual elements from the select list with the Eclipse keyboard shortcut CTRL+D (delete line).




There is also code completion support for the CDS predefined functions (SQL, conversion, date and time functions).




On Clause Wizard


Code completion is great, but sometimes a wizard just gets the job done better. With the On Clause Wizard you can easily create the ON clauses of your SQL joins and your association definitions. To start the wizard place the cursor on the ON keyword and use the keyboard shortcut CTRL+1.  Choose “Define ON conditions”. Create the conditions by mapping the fields of the source data sources (left hand side) with the target data source (right hand side) using drag & drop. Use the Filter to quickly find corresponding fields in the data sources by name or by type. The wizard also offers some pre-defined strategies to automatically generate the mappings. The mappings can be generated “By Name” or, if your sources are database tables, “By Foreign Key”. In this case, any foreign key definitions stored in the ABAP Dictionary for the database tables can be used to generate the mappings.




Active Annotations View


In addition to the “core” annotations supported in SAP NetWeaver AS ABAP 7.4, there are now many more domain-specific annotations which you can use in your CDS view definitions. These annotations can be used for OData exposure and analytical consumption of CDS views. If you have defined view hierarchies (“view on view”) then the element annotation values are propagated from the underlying views to the view above. If you want to know which annotations your view contains (including the propagated annotations) and where the individual annotation values originated from, then you can use the Active Annotations View. Start the view in the context menu of the DDL source: Open With > Active Annotations. For each annotation the value and the origin is displayed. Navigate to the origin by double clicking on the  data source or data element name.




Show SQL CREATE Statement


If you want to see which SQL joins were generated in the database system for the path expressions in your view definitions or if you want to see the order of the generated joins, then you can easily display the CREATE statement for the corresponding SQL view directly in ADT. Select “Show SQL CREATE Statement” in the context menu of the DDL source.




Dependency Analyzer


Another useful tool to help you analyze the dependencies of your CDS view is the Dependency Analyzer. While the CREATE statement only displays the direct dependencies, the Dependency Analyzer recursively analyzes the data sources and also displays the indirect dependencies to other database objects in the SQL Dependency Tree. In the Dependency Analyzer you can see which database tables are used by your query to select data from the database and you can easily identify redundant joins which might negatively affect the performance of your query. Start the Dependency Analyzer in the context menu of the DDL source: Open With > Dependency Analyzer. Search for database objects by entering the SQL name in the Search Toolbar. Navigate to the objects by double clicking on the SQL name. Finally, you can export the contents of the SQL Dependency Tree to a CSV file to analyze the dependencies in another external tool.



As an experienced trouble-shooting expert you certainly encountered the ABAP statement LOG-POINT.
Using statement LOG-POINT in ABAP you can

  • log the content of nearly all kinds of variables – including internal tables
  • specify an arbitrary subkey for log event aggregation
  • switch on logging dynamically by using transaction SAAB

But as this kind of logging uses dedicated ABAP statements the source code has to be prepared beforehand. However, there is lots of ABAP code around, which is not prepared for logging yet.

What if you need to analyze such code without the possibility to change it, e.g. in a productive system?


New: Setting logpoints dynamically

With dynamic logpoints (available with SAP NW ABAP 7.5) you can now set logpoints dynamically -much like you set breakpoints- at arbitrary source code positions and even in productive systems (as long as you have the necessary privileges).
To set a dynamic logpoint simply right-click the marker bar next to the source code line, where you usually set a breakpoint. In the context menu simply click on “Add Logpoint…”.



In the “Add Logpoint” dialog you can choose between different predefined activities for different use cases, like “Log Simple Variable Values”, “Log Call Stack” and more or you can use the more advanced “User-Defined Logging”, where you can enter the variables to be logged, the key for aggregation and an optional condition in a free-style way.


But let us first have a look at a simple example.


Example 1: Logging simple variables

Function module RS_TABLE_LIST_CREATE is used by transaction SE16 to create, generate and call the ABAP report needed to display the individual database table contents. It takes a parameter TABLE_NAME, which is the name of the database table to be displayed.

We now want to know, which database tables are being displayed in our system and how often.

Therefore, set a dynamic logpoint at the first executable line of the function module RS_TABLE_LIST_CREATE, choose activity “Log Simple Variable” for your logpoint and specify variable TABLE_NAME as variable to be logged:




Don’t limit the logpoint activation for specific users or application servers. Just leave the “Activation” section as is and press “finish”. Now your logpoint is activated for all users at all servers and the system collects the log data for you.


In the source code, you can now see the red logpoint symbol in the marker bar. Hover over the symbol and you’ll see the logpoint properties at a glance.



After a while you want to see your log results, so switch to the logpoint view. Refresh the display by using the “Collect logs …” button:


In the example described here 7 log events have been collected after a while.



If you now highlight the logpoint entry of RS_TABLE_LIST_CREATE, the result display comes up at the right side of the logpoint view:


You can now see the individual database table names and how often they have been displayed in the system using transaction SE16.



Example 2: Who is calling my service? (Log Call Stack)

If you need to change the behavior of a specific service  (e.g. a function module or method), you should know, who is calling it. The information of the direct caller might be sufficient sometimes, but often you need to know the complete ABAP call stack for a deeper analysis.

How can we tackle such a task with dynamic logpoints?


Assume that we are interested in a special service that is the UTC time stamp conversion to system time implemented in method CL_ABAP_TSTMP=>SYSTEMTSTMP_UTC2SYST. We now want to analyze, who is calling the service and how often.

This is rather simple. Just set a dynamic logpoint at e.g. the first line of the method implementation and use the predefined activity “Log Call Stack”.


Activate the logpoint and after a while switch to the logpoint view to have a look at the results.

It may look like this.



On the left side of the result display hash key values can be found, representing all individual ABAP stack hierarchies the method CL_ABAP_TSTMP=>SYSTEMTSTMP_UTC2SYST was called from. The “Log Events” column on the right side tells you how often this has happened. If you navigate into the details of one result display row, you can see the involved ABAP stack in the column “Field Values”.

So you just need a few clicks to get complete information about how often a dedicated service was called in a system and who called it along with detailed information about the ABAP call stack.


But now you may ask yourself:

Where do the hash key values come from and what they are good for?

To answer this, we first need to look at the more advanced activity “User-Defined Logging” in the next example.



Example 3: Log the number of ALV items displayed by the transactions executed in the system

In this example you will see, how easy it is to detect the transactions in your system, which are using ALV and how many list items they show. A glimpse of the content displayed by ALV can also easily be added.

To realize this you should use the activity “User-Defined Logging”, with the input fields “Key Definition”, “Field Values” and an “Optional Condition”.

Now set a dynamic logpoint at the first executable line of function module REUSE_ALV_GRID_DISPLAY. Parameter T_OUTTAB contains the data to be displayed.


In the key definition specify the built-in functions req_type() and req_entrypoint(), which are returning the request type and the name of the current request (e.g. "TA" and "SM50"). Then the literal ‘ALV lines:’ is used for better readability and finally the built-in function lines( ) puts the number of lines of table T_OUTTAB[] into the key string.

In the Field Value section specify the first line of table T_OUTTAB[], just to get an idea what kind of data is displayed in the current transaction.

Last but not least you may want to limit the logging to certain users, which can be done in the condition, like it is shown above.


After a while you get results like this:


You can now clearly see what requests/transactions are using ALV, how many lines they are showing and how often they have been called in the system.



In this example, we used the built-in functions

  • req_type( )
  • req_entrypoint( )
  • lines ( )

But there are more.

Other useful built-in function are for example

  • stack_hash( )
  • stack( )

The stack_hash( ) function returns a hash key of the current ABAP stack, while function stack( ) delivers the current ABAP stack itself in an internal table.


Now you can understand, what the activity "Log Call Stack" in example 2 is doing: It pre-fills the "Key Definition" input field with stack_hash( ) and writes function stack( ) into the "Field Values".

The unique hash value returned by stack_hash() makes the system to count similar and collect different ABAP stacks, while function stack( ) puts the ABAP stack into the "Field Values" of the result display by returning an internal table, filled with the ABAP stack.


You have seen how easy it is to configure, start and display your individual tailor-made analysis with dynamic logpoints.

Use the predefined activities, like "Log Simple Variable Values" or "Log Call Stack", wherever it is sufficient for you and use the full-fledged flexibility of the "User Defined Logging", where you need it. There is nearly nothing you can not do with dynamic logpoints.

And the best thing is: you not even have to change the source code for it!

What's it all about

During debugging you may need to perform one of the following actions:

- Start Garbage Collector

- Execute Commit Work on Database

- Execute Rollback Work on Database

- Debug asynchronous Update Task ("Update Debugging")



How to use

Within a debug session, a new dropdown menu offers different actions for the debugger. You can find the menu in the action bar, right next to the stepping actions:



The "Update Debugging" action effects, that the function modules, that have been called "in update task" are caught from the debugger in new debugger sessions respectively, right after their processing has been started with a "commit work" in the running program.


The Garbage Collector instantly starts the (otherwise) system controlled garbage collection - which may be useful when performing memory analysis.


Further Details

Since the DB operations represent a significant invasion of the debugged process and its runtime, they are only available if the authorization to perform changing operations is given to the debug user! If the user is not authorized to perform changes within the debugger, they are greyed out!

Efstratios Tsantilis

Soft Breakpoints

Posted by Efstratios Tsantilis Oct 22, 2015

What's it all about

In certain situations, working with breakpoints may be difficult, when they are set in ABAP programs, that are called very often and/or uncontrollable for your user. For example, a web application may trigger several requests, while you may want to debug a single request.

Soft Breakpoints are the right instrument to get along with this situation - they are effective only in running debugger session, or put in other words: they are not capable to launch a new debugger session!

Soft breakpoints are not needed very often - but when you need them, you can hardly get along without them!


How to use

The "soft" property can be found in the breakpoint properties, that can be either reached via context menu in the vertical ruler, or the breakpoints view.


If a breakpoint is set soft, its color is changed to green, and the tooltip includes this property.


You can quickly create or toggle soft breakpoints if you hold the "ALT" key when double-clicking on the vertical ruler to toggle a breakpoint.

In a supposed situation, you may have one "catchy", breakpoint at a certain program position, that is supposed to launch the debugger. This breakpoint is left "hard". By toggling this breakpoint active/inactive, you could control if you want to have new debugger sessions respectively.

If all other breakpoints are set "soft", they will only be effective, if the debugger has been launched already by the catchy breakpoint from above.


Further Details

Dynamical Breakpoints (Statement Breakpoints and Exception Breakpoints) are created as Soft Breakpoints by default, for caution purposes. This means that you will have to uncheck the soft property, or set a line breakpoint to launch the debugger, if you want the breakpoints to be capable to launch new debugger sessions.

What's it all about

In some situations breakpoints let the program stop too often, when program parts containing breakpoints are processed very often, e.g. within framework code, or in a loop. Conditional breakpoints are a very useful and powerful possibility, to help yourself, focus and speed up your runtime and code analysis in such cases.


How to use

A condition can be set within the breakpoint properties. There are two possibilities to edit them:


1.) Context Menu on the breakpoint icon in the vertical ruler bar




2.) Select the breakpoint within the Breakpoint view


After having set the condition a decorator is applied to the breakpoint's icon. The breakpoint's tooltip implies the condition, too.



Further Details

The condition is not syntactically checked against the embedded program context - only a high level check is performed, to ensure the condition is formally correct and complete. Only runtime known variables and debugger defined expressions (like itab[1]) can be used - method calls or other built-in ABAP expressions cannot be used. You can find further details in the documentation.

During runtime, the condition may not be evaluable, e.g. due to reference to an unknown variable. In this case the breakpoint is effective, (i.e. the debugger stops), indicating that the condition is invalid.

In this example, an obviously invalid variable is used within the condition. This is made visible when the breakpoint is reached within the debugger:



You want, for example, to fix a method implementation of a class quickly. Unfortunately, some other method implementations have already been locked in a transport request by your colleague. Up to now, you could just assign your fix to your colleague's request.


From now on, you can decide to which transport request you want to assign your changes


How does it work? When you start editing a class and parts of the class are already assigned to open transport requests, the system will open the Link Up of Transport Requests dialog. Here you need to decide whether you want to assign your changes to the transport request of your colleague or to another one.



Fig. 1: Example of a dialog where you select the assignment of the transport request


Choose one of the following options to handle your changes:

  • Link up with selected transport: to combine with the already assigned transport request
  • Select other transport at save: to assign another new or existing transport request

       NOTE: Changes to method implementations, which are already assigned to another transport request, are not supported.

  • Chancel: to have a break and maybe to discuss with colleagues how to continue


Thus, this feature allows you more flexibility to manage changes and makes a developer’s life a little bit easier.


For further information, enjoy taking a look on the help documentation:

In this second part of the AMDP debugging article I would like to provide some additional details and tips for the work with AMDP procedures and ADT. This is probably only relevant for you if you actually work with AMDP or plan to do so in the near future. If you only want to get an overview the first part of the article should be sufficient.


More Details about AMDP Debugging

Debug Mode

During the execution of AMDP procedures every procedure of the call hierarchy runs either in debug mode or in optimized mode:

  • Optimized mode improves performance by using mechanisms like parallelization, inlining and others. These optimizations can potentially interfere with debugging. One unusual but simple example would be a read-only procedure without any exporting parameters. Since such a procedure can never have any effect it’s not executed at all in optimized mode and therefore breakpoints within this procedure cannot be reached.
  • Debug mode will prevent such optimizations. Additionally only procedures in debug mode will recognize breakpoints that are newly created during an active debug session. Its drawback is that the procedure must be recompiled in debug mode during breakpoint creation or debugger start and this can become time consuming for large procedure hierarchies.


The decision regarding which procedures run in debug mode and which in optimized mode can be influenced by the Compile in Debug Mode setting. It can be changed in the properties of your ADT project under ABAP Development -> Debug:

  • Only procedures containing breakpoints: Breakpoint creation and debugger start is faster but can have optimization side-effects. (Default, necessary for very large procedures / call hierarchies)
  • All called procedures: No side-effects but can cause long waiting time for breakpoint creation or debugger start up. (Recommended for small procedures / call hierarchies)


Breakpoints get the status pending (blue) when they are valid but the procedure is not yet ready to be debugged because it must be recompiled in debug mode. Once procedure compilation has finished the associated breakpoints will get the status confirmed (green).

Procedures that are running in optimized mode are gray colored in the call stack. If you select an optimized procedure in the call stack the exact code position of the call cannot be determined, therefore it will navigate to the start of the procedure.


Differences to other DB procedure debuggers

This section originates from my personal knowledge of a rather wide and complex domain, so please do not fully count on its correctness or completeness.

Currently there are three different development environments that you can use to develop database procedures, depending on your requirements and use cases:

  • As you know ADT is an eclipse based IDE and offers DB procedure development via the described AMDP concept
  • HANA Studio is also an eclipse based IDE for the development of HANA native applications and it enables you to create database procedures directly as HANA artifacts
  • HANA Web-based Development Workbench is a lightweight web-based alternative for HANA Studio

ADT and its AMDP Debugger are tailored for the ABAP context and therefore cannot be used to debug native DB procedures (procedures that are not generated from AMDP). To debug native DB procedures you have to use one of the other two alternatives.

HANA Studio and HANA Web-based Development Workbench however can be used to debug AMDP indirectly via debugging the generated DB procedures. Sometimes this can be a bit confusing, especially since ADT and HANA Studio are both eclipse based tools and can run side by side within the same eclipse installation.

The used debugger then depends on the position of the breakpoint:

  • Creating a breakpoint in the AMDP class itself, that means the ABAP class that contains the embedded code, addresses the AMDP Debugger
  • Creating a breakpoint in the generated DB procedure addresses the HANA Studio Procedure Debugger


Although every environment comes with its own procedure debugging front end they all use the same core functionality on the DB layer.

Terminate vs. Disconnect


To cancel an active debug session you can use the functions terminate or disconnect:

  • Disconnect: Stops only the debugger itself, the debuggee (= the procedure that you are currently debugging) is released and continues its execution. That means the code after your current position will be executed.
  • Terminate: Stops the debugger and the debuggee. The processing of the database procedure will be canceled and no further code will be executed.

Please note that your current selection in the debug view is relevant. In Eclipse these kind of actions always refer to the debug entity that is currently selected in the debug view.

Debug for a different user

If you have to debug the process of a different user then you can use the same setting as for the ABAP Debugger (It's shared). You can find it in the properties of your ADT project under ABAP Development -> Debug.

Further tips for working with AMDP

The following features can potentially make the work with AMDP procedures in ADT more comfortable.

Background color for embedded languages

To highlight the parts of your class that contain embedded code like SQLScript choose the ADT menu "Window" -> "Preferences". In the preferences popup choose "General" -> "Appearance" -> "Colors and Fonts". Within the Colors and Fonts preference page choose "ABAP" -> "Syntax Coloring" -> "Embedded Language".


Group breakpoints by type

In the breakpoints view you can group your breakpoints by type using the pulldown menu (small white triangle).


Use the AMDP Preview

If you want to quickly check the results of a certain AMDP procedure or just execute it (e.g. to trigger the debugger) you can use a tool called AMDP Preview. To open it expand the relevant AMDP class in the project explorer, open the context menu for the relevant procedure and choose "Run As" -> "Data Preview" (see first screenshot). Once opened you can enter own ABAP code in the area between "begin custom code" and "end custom code" in order to provide importing parameters for the procedure. Since custom ABAP code is executed here you need to have developer authorization. When you ensured that the importing parameters will be supplied correctly you can finally press the run button to execute the procedure and see the results on the right half of the tool.




Data Preview Pin

Once you have opened a table variable in the data preview during debugging an AMDP you can pin the current variable to this view using the pin button (see screenshot). When you now double click another table variable you can see that another instance of the data preview will be opened. You can use this to compare table values or to keep an eye on multiple table variables during stepping.


If you are an ABAP developer and the terms ABAP for HANA, code push down or database procedures sound interesting for you, then you may have already heard about ABAP Managed Database Procedures (AMDP). This article shortly repeats what AMDP is and explains how to debug AMDP procedures using the new AMDP Debugger - which is now part of the ABAP Development Tools (ADT).

What is AMDP?

The goal of ABAP Managed Database Procedures is to make the world of database procedures available for ABAP Developers. In order to achieve this, AMDP offers a way to create, edit and transport database procedures nearly like standard ABAP classes. With the new AMDP Debugger there is now also debugging support directly integrated in the ABAP tool environment.

Example for an AMDP procedure:


A single AMDP procedure is implemented as an AMDP method and its content is written in a database-specific language like SQLScript. One or more AMDP methods are part of an AMDP class that looks almost like a usual ABAP class. The AMDP methods can be directly called from ABAP in the same way as normal ABAP methods.

During activation of such an AMDP class for every AMDP method one DB procedure is generated on the DB layer. During runtime (when an AMDP method is called from ABAP) the corresponding generated database procedure is executed. For the importing and exporting parameters there is an implicit automatic type mapping.

For more information about AMDP see also:

About the AMDP Debugger

Technical Prerequisites for the AMDP Debugger

  • HANA DB SPS9, or higher (SPS 8 with restricted functionality only)
  • SAP NetWeaver 7.50, or higher
  • ABAP Development Tools 2.51, or higher

To go along with the AMDP concept there is no need for a database user or additional authorizations. You only need your ABAP user with the standard ABAP debug authorization to be able to use the AMDP Debugger.

AMDP Debugger and ABAP Debugger are not identical

ABAP programs and database procedures are executed in different environments during runtime:

  • ABAP programs are executed in the ABAP runtime environment on the application server layer (AS ABAP).
  • Database procedures - also those generated from AMDP - are executed in the procedure runtime environment on the database layer (e.g. HANA DB).

Therefore the ABAP Debugger, which is also part of the application server layer, cannot simply reach out for the database layer to control the procedure execution in a foreign runtime environment. Instead that is the task of the AMDP Debugger which is in fact a standalone debugger, independent from the ABAP Debugger and technically rooted on the database layer itself.

Since AMDP procedures are directly called from ABAP it was one of the main goals of the AMDP Debugger to offer a smooth transition from ABAP debugging to AMDP debugging and vice versa. Nevertheless it's still good to keep in mind that there are two different runtime environments / debuggers involved when working with AMDP.


One difference between AMDP Debugger and ABAP Debugger is the fact that the AMDP Debugger has to be started before you can do anything else. If the debugger has not been started your DB procedures will not stop at breakpoints. To deal with this we implemented an automatism within ADT to start the debugger implicitly when a user creates a breakpoint for an AMDP.

Stopping the AMDP Debugger after usage is also important because it is rather resource intensive for the ABAP Server and it's not affordable to have an active debugger instance for every user in the system all the time. For this reason there are two automatisms to stop the debugger implicitly:

  • When a user closes the IDE
  • When a user is idle for 10 minutes (timeout)

Besides this the user always has the possibility to start or stop the AMDP Debugger manually. This is for example necessary when you re-open your IDE after closing it and try to start a debug session with your old breakpoints instead of creating new ones.

Since the current activation state of the AMDP Debugger is quite important it is also reflected by the color of the breakpoints:

  • Gray - debugger is inactive
  • Green - debugger is active, BP is confirmed
  • Blue - debugger is active, BP confirmation is pending

Breakpoints are usually only for a very short time blue / pending, often you won't recognize that state at all.

How to use the AMDP Debugger - Demo

The following video shows how to activate and deactivate the AMDP Debugger, how to perform stepping and variable inspection and how the AMDP Debugger cooperates with the ABAP Debugger.

In order to keep the demo simple I used strongly simplified example code, so don't be irritated by the fact that the result of the AMDP could also be retrieved by a single line of Open SQL.

Features and Restrictions

As last part of this article you can find here the lists of currently supported features and restrictions (10/2015):

Supported Features:

  • Change comfortably between ABAP debugging and AMDP debugging
  • Create and manage breakpoints in the embedded code of AMDP classes
  • Step through procedures using Resume (F8) and Step Over (F6)
  • Inspect scalar variable values
  • Analyse table variables including sorting and filtering
  • The languages SQLScript and Llang can be debugged


  • Native DB procedures - that are not generated via AMDP - cannot be debugged
  • CDS table functions are not yet supported
  • No Step Into (F5) and Step Out (F7) available
  • No support for changing variable values
  • Variable inspection only for top of stack
  • With HDB SPS8 the AMDP Debugger must be restarted after every debug session (not with SPS9+)

Further details and tips

The second part of this article is probably only relevant for you if you actually work with AMDP or plan to do so in the near future. If you only want to get an overview the first part should be sufficient.


Part 2: How to debug ABAP Managed Database Procedures with ADT - Details and Tips

Since NW7.5 SP00, data elements are native integrated in a form-based editor in ABAP Development Tools (ADT). This means, you can now create and edit data elements directly in ADT without opening transaction SE11 in the classic SAP GUI.


How Does the New Editor Look Like?

The data element editor displays all relevant information at a glance and is divided into the following three sections:

  1. Data Type Information for defining the type of the data element based on a predefined type, domain, and so on
  2. Field Labels for defining the relevant UI text and its maximum lengths
  3. Additional Properties for adding search helps or defining the reading direction of UI text and so on


         Fig. 1: Example of a data element that is opened in the form-based editor


Which Functionalities Does It Provide?

Within the three sections you can arrange your data element by combining the provided fields and elements. Play with the values from the dropdown listboxes and see what happens. Then, other fields might be no more selectable others become available. So, the editor automatically adopts the dependencies among the currently selected values.


From the toolbar, you can perform the following actions on a data element:

    1. Duplicating it to create the exact same object in a selected ABAP package
    2. Opening it in the integrated SAP GUI or in another ABAP project
    3. Sharing an ADT link with your colleagues to open it directly in another ABAP in Eclipse client
    4. Navigating to the context-relevant help documentation


What Are The Advantages of The New Editor?

The form-based editor makes your daily work as follows easier:

  • Usability: You don´t need to switch between several tabs anymore. ADT serves you all information smoothly in one view.
  • Content Assist: You forgot, for example, the name of the search help that you want to add? No problem. In the corresponding input fields, choose Ctrl + Space and the content assist functionality enables you to search for it. Just start typing. You can also use wildcards here.
  • Element Info Popup: As it were not enough, you can get further information from the element info popup. The corresponding one is automatically opened when you select a proposed value from the content assist.
    Fig 2: Example of an element info popup providing information about a parameter


How to Create and Edit Data Elements?

The creation is also based on a creation wizard as you are used to from ABAP classes, interfaces, programs, and so on.


Fig 3: Example of a creation wizard

To create a new data element, proceed as follows:

  1. Choose File > New > Other from the menu bar.
  2. In the New ABAP Repository Object dialog, enter Data Element and double-click the finding.
  3. Enter the Name of your object and its Description.
  4. Choose Next to handle the transport management and/or Finish to start the creation.
    Result: The new data element is created in the back-end, displayed in the Project Browser tree, as well as opened in the form-based editor. The Domain category is set by default.
    The displayed content in the sections of the form-based editor depends on your selection. So, if you choose a specific property, the editor will look different and automatically adopts to the new conditions.


To edit a data element, proceed as follows:

  1. In the Data Type information section, choose the Category from the dropdown listbox.
    According to your selection, the subsequent values are displayed.
    NOTE: In all input fields, the content assist functionality is supported. Choose Ctrl + space to display and select the existing values.
  2. In the Field label section, enter the respective texts you want to display on your UI.
  3. [Optional:] Choose the spin button to redefine the field length.
  4. In the Additional Properties section, you can, for example, optionally:
      1. Enter an existing or create a new search help to reference or create a new search help object.
      2. Enter an existing or create a new Parameter ID to associate a data element with an SPA/GPA parameter..
      3. Enter a Component Name to structure the reference of components or table fields to the entered data element.
      4. Select the Change Document Logging checkbox to log changes to fields in database tables defined with reference to this data element.
      5. Select the Input History checkbox to activate or deactivate the SAP GUI history for dynpro fields defined with direct or indirect reference to the data element.
      6. Define the direction of UI text.


For detailed information, enjoy taking a look on the help documentation:

ABAP community,

I have very good news for you: We reached the next big milestone for the application server ABAP. The new version 7.50 was launched. You can find a very good summary about the key features in the blog post:  SAP NetWeaver AS for ABAP 7.5  - One ABAP Platform for SAP Business Suite and SAP S/4HANA, on-premise edition


Based on this version we also provide you a new version of the ABAP develoment tools for eclipse. This version is available on our Eclipse Updatesite: SAP Development Tools for Eclipse


ADT version 2.51 contains a bunch of new features that I will present to you in the following sections of this blog:





Dictionary Tools for Eclipse


The CDS view building is available in eclipse since a couple of releases. But what about the other dictionary editors in eclipse?

So we thought about it and came to the conclusion that it is a good idea to provide these tools now also in eclipse. With ADT 251 an editor for data elements and dictionary structures are available for you. The others will follow in upcoming releases.

The editor for data structures is source-based. That means we defined a new syntax for structures based on the CDS specification:



You have all the benefits of source code editors like:

  • Copy&Paste
  • Code Completion
  • Search&Replace
  • Syntax Coloring
  • Navigation
  • Elementinfo
  • Quick Fixes

Very important to know: The persistency on the ABAP in the dictionary is the same as in SE11. That means you can edit the same structure with SE11 and eclipse in parallel. There is no migration into the new format needed because the source is created on the fly when opening a structure in eclipse. You can find more details about the new structure editor in this blog post:

New Dictionary Structure Editor


For data elements we followed a form-based approach similar to SE11:



Please find all the details about the new data element editor in this blog post:Editing Data Elements in a Form-Based Way


New Quick Fixes

According to our users the quick fixes are one of the most important features when developing with ABAP in Eclipse.

In the new ADT version there are some new quick fixes available in the area of the exception handling. You know the situation when using frameworks like the ALV for example. You are calling a lot of methods of the framework in your code and at the end the editors says to you that you have missed to catch some exceptions that might occur during runtime.


A tedious job starts now to find the possible exceptions and declare them in a Try/Catch clause. STOP, this is not needed anymore. Just use the new quick fix 'Surround with Try/Catch' and you save a lot of time. 


Here is how it works:


Try it out. It is really cool !

Another quick fix that was often mentioned in SCN is the possibility to create getter and setter methods.

Here is how it works with eclipse. Just click CTRL-1 on an attribute in your class and choose the option "Generate Getter and Setter" :


The editor automatically adds the new method declarations and implementations of the methods to the class.



That is really quick, isn't it ?



News from ABAP Doc


ABAP Doc offers you a powerful tool for documenting your source code. You just use the same editor for documentation and for coding. A comprehensive overview about the idea and the features are described in the blog post: ABAP Doc

We got a lot of feedback in the meanwhile concerning the concept. One topic was the relation between ABAP Doc comments and the short texts entered in the ABAP Workbench. The second topic was the generation of offline HTML files for the documentation.


Both topics are solved now with ABAP 7.50:

  • Automatic synchronization between the ABAP Doc comments and the short descriptions is available now
  • Possibility to generate HTML documents for classes/interfaces is available now    


Please find more information in the blog post: New ABAP Doc Features with NetWeaver 7.5

News from the Property View


Did you ever try to change a function module to a remote-enabled function module in eclipse? For this, you needed to open the SAP GUI. From now on, you can edit these object type specific properties, such as the processing type directly in ADT. You will find a new tab called 'Specific' in the eclipse property view. For some of the properties we also offer you nice value help for your convenience:


Change package assignment

Have you ever tried to move a development object from one package to another one? In the past this was only possible via the workaround in the SAP GUI. Now we have integrated this nice little helper natively in eclipse. In the Project Explorer, just open the context menu on an object and choose Change Package Assignment:


In the subsequent dialog, enter the name of the package where you want to move the object to. If you want to see a list with the available target packages, only choose Ctrl-Space for opening the content assist.


After clicking Finish the assignment to the new package will be created.

Assign changes of classes to separate transport requests

Working with classes in eclipse was sometimes a big hurdle when several developers work in parallel on a class and want to store their changes on different transport requests. This was not possible so far. Only one request can be chosen per class. This limitation is now gone with ABAP 7.50. The behavior is now similar to the ABAP workbench.

Please find some more details in this blog post here: Assigning Changes on Classes to Multiple Transport Requests

Developing ABAP Transformations in Eclipse

Simple transformations and XSLT are helpful friends when working with XML documents in ABAP. We also use them heavily in the ADT framework to transfer the data from the ABAP backend to the eclipse client. With the new ADT version you can edit the transformations now also in eclipse. Good luck for us: we could reuse the standard XML editor from eclipse.


See the following blog post to find all the details about the new editor in eclipse:

Editing Source-Based Transformations for XML

News from the Debugger

Also in the area of the ABAP debugger in Eclipse we did some major improvements with the new ABAP version 7.50.

One of the top prio features on the wishlist of our users weas the possibility to create conditional breakpoints. And here they are.

See this blog post for more information about the new breakpoint kind: Conditional Breakpoints  

Another breakpoint type are the so called soft breakpoints. These breakpoints are only valid in the current debug session. Please find the details in this blog: Soft Breakpoints 


A very important round-off in the debugger is the possibility to trigger database commit and rollback during debugging and the possibility to debug update tasks. Here we go with AS ABAP 7.50: Execute Commit/Rollback Work on Database / Update Debugging .

Since AS ABAP 7.40 SP05 with HANA it is possibe to program stored procedures in ABAP. It is very easy because you just develop a method of an ABAP class with SQL script instead of the ABAP language. You don't have to fear the lifecycle issues anymore that we had in the past with SQL Script procedures developed directly in HANA. Unfortunately the debugging of the AMDP methods was not so easy in the past. This isue is gone now. With AS ABAP 7.50 we introduced sql script debugging natively in the ABAP eclipse debugger. See the blog post about AMDP Debugging to figure out all the details: How to debug ABAP Managed Database Procedures using ADT - Basics



New tracing and logging capabilities for ABAP

The ABAP trace tool in eclipse with its new visualization capabilities is in the meanwhile a very famous troubleshooting tool for the ABAP developer community. If you missed that train so far you may refresh your knowledge in that overview document: http://scn.sap.com/docs/DOC-41223

In most of the cases the biggest issue with tracing is the size of the trace file. Therefore we investigated in a new aggregation kind to optimize the trace file size. In this blog ABAP Profiler - Aggregation by Call Stack it is described how to use this new feature. This new aggregation kind comes along with additional visualization capabilities.    

Static logpoints are present in ABAP since quite a long time with the ABAP statement LOG-POINT. The disadvantage is that all logging capabilities of the system needs to be foreseen already by the developer at designtime. With dynamic logpoints you now have a new powerful tool in your hand. This is really a highlight of the new ABAP version 7.50. Give it a try and read the details how to set these new logpoints in the blog post: Dynamic Logpoints in ABAP


What's New in the ABAP Web Dynpro Tools?


We now provide a native eclipse editor for Web Dynpro components and applications with AS ABAP 7.50. Find more information in the blog: The specified item was not found.



SQL Monitor for ABAP in Eclipse


The SQL monitor is a very powerful tool to optimize the migration efforts for Suite on HANA and S/4 HANA. But what we missed was the developer support for it in eclipse. This gap is now closed with AS ABAP 7.50. Please find a detailed description how to use the SQL monitor in Eclipse to find performance hotspots in your code:  3 Simple Steps to Identify Performance Hotspots in ABAP Custom Code



News from the CDS Editor

CDS (Core Data Services) is the new modelling language in ABAP. With the new ABAP version 7.50 we support a lot of new cool features. Find all the news of the Editor in the blog post: New ABAP CDS Tools in SAP NetWeaver AS ABAP 7.5

Especially the graphical viewer for CDS models is very helpful when dealing with complex models:

Representing Core Data Services Concept in Graphical Form

Woh, a lot of new stuff. Hope you like it and have fun.


Warm Regards,



Filter Blog

By author:
By date:
By tag: