SAP NetWeaver 7.0 EhP2 brings you a rich set of new features and enhancements in ABAP Testing and Troubleshooting tools which will boost the efficiency of the entire ABAP development.
This blog gives an overview of the major improvements and new tools and features in the areas of ABAP Testing and Troubleshooting.
If you use external debugging in ABAP - that is, debugging of HTTP and RFC requests which arrive in your ABAP system - then you have used the user breakpoint for external debugging. There are, however, situations in which the user breakpoint is not adequate - for example, if a request is load-balanced to another server than the one you are on or your requesting user is mapped to another user or is ignored because of a generic user for requests.
For these situations, SAP NetWeaver 7.0 EhP2 introduces a second technique for external debugging to supplement user breakpoints: request-based debugging (debugging via Terminal ID). A user breakpoint is now server-independent and active on all application servers of an ABAP system. With request-based debugging you can capture any external HTTP or RFC request for debugging, without regard to the user who submitted the request or the application server at which the request is processed. The execution of the requests of other users is not affected, which makes it possible to debug problems in production systems without disrupting normal operations.
To activate request-based debugging check TerminalID checkbox in the debugger settings (Utilities->Settings->Debugging), apply the settings and set a user breakpoint.
To transmit Terminal ID in case of HTTP requests download SAP HTTP Plug-in for Internet Explorer from the OSS Note 1041556, start the plug-in and it will start the browser. Start your application and press Start Transaction button on the plug-in. In case of RFC requests sent from SAP GUI use Ok code "/htid".
In the old days of R/3, debugging ABAP business logic was easy. You enter "/h" to start the debugger or set a breakpoint, and you find yourself right-away in the middle of your application code. Nowadays, finding your code in the debugger is often not so easy. Business logic now relies on application frameworks and technical frameworks and infrastructures such as ESI or Web Dynpro ABAP. It may be hard to find your way to your application logic in the debugger, since significant amounts of infrastructure code are in the way. Often infrastructure code is intermingled in your application code, so that even a direct breakpoint doesn't necessarily let you concentrate only on your code.
SAP NetWeaver 7.0 EhP2 resolves this problem and gives you full control over what you debug with a new debugging mode: Software Layer Aware Debugging (SLAD). With layer aware debugging you can debug only relevant parts of ABAP code and hide the rest. Furthermore you can define layers - for example, the database layer, application layer, or the UI layer - and then jump from layer to layer instead of running through all of the code with conventional debugger steps.
It works as following. By using the new transaction SLAD you define specific object sets (or layers) which should be accessed by debugger and hide the rest of the code. In the SLAD you select objects into selection sets (your packages, programs, classes, function modules ...) and use ABAP logical operators (AND, OR,...) to combine them to object sets (layers). Layers are normal ABAP transportable objects. Then you define your debugger profile (SLAD profile), which consists of such object sets (layers).
After you defined your SLAD profile you can start ABAP debugger and activate layer aware debugging (Configure Debugger Layer button). The pop-up appears where you can load your SLAD profile (or you can define it directly in the pop-up). And the debugger will stop only in visible layers of your SLAD profile. Use normal debugger steps to debug the code within the layer. You can also use a new button Next Object Set to jump between the layers.
Have you ever dreamt of a debugger which debugs your problem on its own - in a (semi-) automated way? A debugger which also allows you to write all kinds of information to a trace file?
In SAP NetWeaver 7.0 EhP2, the new ABAP Debugger introduces Debugger Scripting. With ABAP Debugger Scripting you can automate anything that you can do by hand in the debugger - and you win some new capabilities, such as flexible tracing. Debugger Scripting lets you control the debugger with a small ABAP program. The script program accesses the same information about your application in the debugging mode as the debugger itself. The script can do everything that the debugger can do: analyze content of variables, execute debugger steps, change object values etc. It can also write information to a trace file.
You can write debugger scripts by using normal ABAP and a rich set of pre-defined script functions (methods of the ABAP Debugger Interface) comfortably offered to you by Script Wizard. In your script you can stop, trace, or change the context of your program in the debugging mode. An integrated Script Tool allows you to write, save, load, and execute scripts and view traces, your own and those created by other users.
So which are the typical use cases for the ABAP Debugger Scripting? You can analyze the behaviour of your application by writing custom traces or implementing your own conditional breakpoints and watchpoints, you can write interactive debugger scripts to investigate typical error situations (dump analysis, consistency check,...), or analyze and display complex data structures (think of generic application frameworks!).
A new standalone transaction SAS allows you to maintain scripts and display script results.
In SAP NetWeaver 7.0 EhP2, ABAP brings you re-worked and greatly expanded memory analysis capabilities, in both the new ABAP Debugger and in the Memory Inspector (transaction S_MEMORY_INSPECTOR or SMI). Here are the main new features:
SAT is the transaction name of the new ABAP Runtime Analysis Tool which replaces the earlier transactions SE30 and ATRA. As the successor of SE30 and ATRA, SAT can be used for typical scenarios of ABAP runtime analysis such as performance analysis, program flow analysis or memory consumption analysis.
SAT has a modern and flexible multi-tool user interface (the same as in the new ABAP debugger) which can be customized individually. SAT stores measurement results centrally on the database, which allows analysis of the results from any ABAP server in a multi-server system . SAT also enables cross-system comparison of measurement results.
SAT offers a rich set of flexible new analysis tools which help to analyze different aspects of a trace. You can navigate between tools with comfortable user interface features: display specific trace details or focus on the trace sub-area to analyze it more deeply.
The Call Hierarchy and Hit List tools, which you may know from SE30, continue to be available. But you can also benefit from these new analysis tools:
An ABAP Unit Browser that is integrated into the Object Navigator of the ABAP Workbench allows:
When you test favorites, you can also have the code coverage of the tests in the favorite measured and displayed.
SAP NetWeaver 7.0 EhP2 also adds the tokens RISK LEVEL and DURATION to the CLASS ... FOR TESTING statement to replace the pseudo comments "#AU Risk_Level ... and "#AU Duration ..., which were introduced in SAP NetWeaver 7.0 for defining the properties of test classes.
The class CL_AUNIT_ASSERT is replaced by the new class CL_ABAP_UNIT_ASSERT, and class CL_CONSTRAINT has been replaced by CL_AUNIT_CONSTRAINT. New methods have also been added to the new classes. Existing module tests do not have to be converted to the new classes. However, we recommend that you use only the new classes in new tests.
The Coverage Analyzer has been extended with these new features:
Code coverage is visualized in different colors in the new ABAP frontend editor. To measure the coverage of test runs, the Coverage Analyzer has been integrated into ABAP Unit testing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
4 | |
3 | |
2 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 |