Automation Queue Services

Use

The following services are available to help you use controls in your applications:

  • Debugger: For identifying errors

  • Performance display: Performance optimization

  • Automation Trace: Finding synchronization points

Features

Debugger

If you use buffered operations on your controls, an error in a method call will not become visible until you synchronize the automation queue. Therefore, when you are debugging a program, it makes sense to synchronize the automation queue after every method call. In the debugger you can select the option Automation Controller:Always process requests synchronously. After each automation method, the generic method CALL METHOD cl_gui_cfw=>flush is called.

If the error no longer occurs when the method is called directly, you have called the method CL_GUI_CFW=>FLUSH in the wrong place in your program.

Performance Display

There are two ways in which you can check the number of round trips within your program:

  • Switch on the round trip display in the status bar:

  • Activate the performance display. (Choose Start of the navigation pathSystem Next navigation step Utilities  Next navigation step  Performance DisplayEnd of the navigation path.)

Automation Trace

You can create a trace for the automation queue. To do this, select Automation in the Trace group of the SAPGUI settings. Now, all automation queue calls and their parameters (create object, call method, set/get property, free object) are logged in a trace file.

If an error occurs, it is logged in the trace file (HRESULT error_code).

In addition, you can trace how many flushes are required for each PBO/PAI roundtrip. Superfluous flushes can be eliminated.

When you analyze the method calls to the control using the trace, remember that the ABAP methods often do not correspond to the method names in the trace. This is because the method names in the trace are those of the automation calls to the control. Remember, too, that one method call in ABAP may lead to more than one automation method being called.

CALL METHOD picture->load_picture_from_url
        EXPORTING url = 'http://www.sap-ag.de/germany/images/sapag.gif'

In the Automation Trace, the following would appear: