Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

The Flush Command

Former Member
0 Kudos

Hi,

What is the function of the "FLUSH" command in ABAP? Is it similar to "REFRESH" or "CLEAR"?

Thanks,

Rathul.

4 REPLIES 4

Former Member

It is similar to CLEAR, but in the OOPs Perspective. Here it Frees the Object from all its earlier allocations

To minimize the network load between the application and presentation servers, method calls are buffered in the automation queue before being sent to the presentation server at defined synchronization points . One of the automatic synchronization points is the end of PBO processing . You can force a synchronization point in your program by calling a method that is not buffered, or by calling the static method FLUSH.

Calls from automation methods are collected in the automation buffer until the function module FLUSH - which is provided for this purpose - is called and the FREE OBJECT statement is passed or, at the most, until a change of screen. They are then transferred to the automation server on the current presentation

server for asynchronous execution.

The Flush is executed and the transfer takes place as soon as a statement that does not belong to the automation command set is reached. Note that in the ABAP Debugger, the return values of the individual automation statements are not available until after the transfer to the presentation server.

VB

former_member156446
Active Contributor

Clemenss
Active Contributor
0 Kudos

Hi rathul,

all answers given are correct - except that there is no FLUSH command but a method of the Gui control framework called flush. In actual releases it is obsolete in most cases because SAP has learned that GUI controls at certain points need a flush anyway - so they do it that we can't forget it.

Regards,

Clemens

Former Member
0 Kudos

Hi,

In OO approach, calling a Control-method does not imply that the method is automatically executed at runtime. Initially, the system buffers methods in a queue, referred to as the Automation Queue, when they are called in the ABAP program. The execution sequence of the methods therefore remains unchanged. However, the methods are only executed if they are transferred to the frontend via Remote Function Call (RFC) using method FLUSH. This means that the Automation Queue is used to reduce the number of RFC calls required.

(Due to the buffering of control methods in the Automation Queue, the method calls and the remaining ABAP code are executed at different times. Method FLUSH thus determines a synchronization point).

While communicating between the Automation Controller and the ABAP Objects Control Framework the automation queue uses GUI RFC calls. To minimize the network load between the backend and frontend, calls from the backend to the frontend are buffered and sent to the frontend 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 ).

Reward points if found helpfull..

Cheers,

Chandra Sekhar.