Automation Queue
Use
Communication between the Automation Controller and the ABAP Objects Control Framework uses GUI RFC calls.
To minimize the network load between the back end and front end, calls from the back end to the front end are buffered and sent to the front end in a single batch at defined synchronization points. A synchronization point occurs when you use a method call that is not buffered or explicitly call the generic synchronization method (CALL METHOD cl_gui_cfw=>flush). For more information, see Synchronizing the Automation Queue.
Communication is based on Remote Function Call. It is synchronous, which means that there is a Remote Function Call at each synchronization point. Due to the architecture of the SAP system, these RFC calls may not exceed a certain length, otherwise the connection between the presentation server and the application server will be automatically terminated.
Buffering operations improves performance considerably, since every non-buffered operation results opens a new RFC communication with the frontend. However, you should use buffered operations with care, particularly buffered read operations, since mistakes can lead to runtime errors. For more information, see Error Handling.
Performance Notes
In analyzing performance, you should above all consider the number of synchronization points. In the screen flow logic, the automation queue is always synchronized after the PBO.
However, since you can only handle errors after the synchronization point, you need to strike a balance between optimal performance and ensuring that you handle errors adequately.
If you are working with large quantities of data, you must also be careful that the connection between the application server and presentation server is not terminated due to a timeout. If the connection does time out, you must build additional synchronization points into your application.
For more information about tools to support your performance optimization, see Automation Queue Services.
Prerequisites
There are three kinds of control wrapper methods:
-
Methods that always synchronize the automation queue before they end.
-
Methods that always synchronize the automation queue before they end. In this case, the programmer is responsible for synchronizing the buffer.
-
Methods in which you can specify whether the buffer should be synchronized by passing a parameter value.
Features
Buffered operations are collected in the automation queue. Each internal session has a single automation queue for all of its custom controls. When you synchronize the automation queue, its contents are passed to the frontend and executed there. The result is then returned to the backend.