// // Escribe un comentario

ABAP External Debugging

Nota de Actualización (2017)
El artículo había sido publicado por SAP.com y ahora ha sido eliminado, por lo tanto no se veían las capturas que incluíamos. Hemos eliminado las capturas porque daban error. Mantenemos la info compartida a fines educativos. Disculpen las molestias.



ABAP External Debugging - New User Breakpoint

1. Motivation

The user breakpoint in ABAP helps you to debug the ABAP components of applications, that use RFC- and HTTP- based communications. These could be Web Dynpro applications, BSP's, ABAP-based web services, RFC-enabled function modules and so on. By setting a user breakpoint you can interrupt the processing of external HTTP or RFC requests in your ABAP backend system and debug them.
You can set a user breakpoint in the Object Navigator (transaction SE80) or the ABAP Editor (transaction SE38). Before you set a user breakpoint you may want to specify the user to whom the breakpoint applies. By default your user is set. You can enter the user in the User field of the debugging settings dialog (Utilities->Settings->Debugging). Before you start debugging, make sure that you use the New ABAP Debugger (select the checkbox New Debugger ). Now HTTP or RFC requests can be sent to your ABAP backend system - you are ready to capture them for debugging.





You probably know that an ABAP system usually consists of multiple application servers. In such a system, a user breakpoint works great if you set it on the application server where an external HTTP or RFC request arrives. But where there are multiple application servers, there is also load balancing. Load balancing decides which application server should receive a particular request. A user breakpoint however is only active on the application server where it is set. If a request is executed on another server, then it will not stop at the user breakpoint. The illustration shows you this problem.
What you really need (and what ABAP is giving you in NetWeaver 7.0 EhP2) is a user breakpoint which is valid on all application servers of an ABAP system so that you can capture HTTP and RFC requests no matter which server processes them.

2. New User Breakpoint

Starting with NetWeaver 7.0 EHP2, the validity of the user breakpoint has been extended. A user breakpoint is now active on all application servers of an ABAP backend system.

To set a user breakpoint, proceed as following:
  1. Logon on to the ABAP System which will process HTTP or RFC requests
  2. Open your program in ABAP Editor (SE38) or Object Navigator (SE80)
  3. Ensure that you use the New ABAP Debugger (New Debugger checkbox on in the Utilities->Settings->Debugging dialog)
  4. Enter a user name into User field
  5. Click on the user breakpoint button to set a breakpoint
By default a user breakpoint is valid in the whole system. You can also use the Only Current Application Server checkbox to activate a user breakpoint only on the current application server.
If then a HTTP or RFC request arrives in your ABAP system and gets processed by your program, the debugger starts as soon as the execution of the program reaches your user breakpoint. The debugger starts always in the dialog session (SAP GUI window) where you set a user breakpoint, therefore stay logged on the ABAP system where you set a user breakpoint.

That's it. Now you can set a user breakpoint without thinking about which application server of your ABAP system will process an HTTP or RFC request. You can be sure that none of the external requests will escape your user breakpoint. The prerequisite is of course that external requests originate from the user for whom you set a breakpoint.
If you want to know how to debug in situations where a user mapping takes place before an external request reaches your ABAP system or how to debug external requests from generic users such as for example "purchaser" take a look at the new Request-based Debugging in ABAP, described in the blog mentioned above.
Olga Dolinskaja is a Product Manager for Application Server ABAP
Reblogged from SDN Sap Blogs.

0 comments:

Publicar un comentario

Nota Importante: los comentarios son para agradecer, comentar o sugerir cambios (o hacer preguntas) sobre el artículo de arriba.


Para otras preguntas, por favor envíe su consulta aquí, es gratis!. Su consulta no molesta, le responderemos a la brevedad