Exercise 2: Synchronous Method Processing

Use

As a result of the delay between control method call and control method execution, any error on the frontend only occurs at flush time. However, if synchronization takes place after each control method, you can determine which method terminates processing.

The debugger settings allow you to enable automatic synchronization after each control method. In debugging mode, the system then executes a flush call after each control call. If a runtime error occurs, the call is displayed that caused the error.

Yet the debugger setting for synchronous method processing is not only relevant to determining the termination point. If you track the flow of your program in the debugger without synchronous processing, the control methods are only buffered, but not yet executed. As a result, you lose Sy-Subrc. What is more, variables imported through the methods do not yet have current values.

Procedure

  1. In the ABAP Debugger, choose Settings.

  2. In the debugger settings section, select Automation Controller: Always process requests synchronously.

  3. Activate the trace mode (see Exercise 1: Activating the Trace Mode).

Check Your Work

In the trace run, you see that a flush is performed after each control method.