sapdev logo background
sapdev logo sapdev logo
Comments

ABAP FREE OBJECT Statement syntax, information and example SAP source code



Return to Statement index



FREE OBJECT - OLE

Short Reference

ABAP Syntax FREE OBJECT ole [NO FLUSH].

ABAP_ADDITION:
... NO FLUSH

What does it do? This statement releases the memory occupied for the object ole on the application server . The automation object must have been created with the special statement CREATE OBJECT . After the release, the object is still available on the current presentation server, but can no longer be processed in the ABAP program. For the typing of ole and the meaning of the addition NO FLUSH , the same description applies as for CREATE OBJECT .

The transfer of the statement FREE OBJECT to the presentation layer causes the transfer ot the entire automation queue collected using the addition NO FLUSH .

System fields
sy-subrc Meaning
0Successful memory release
1Error during communication to SAP GUI
2Error during function call in SAP GUI

Latest notes: An automation object ole created using CREATE OBJECT must also be released using FREE OBJECT to avoid memory bottlenecks and terminations of the application to be controlled.

ABAP_ADDITION ... NO FLUSH

What does it do? The same description applies for the addition NO FLUSH as for the statement CREATE OBJECT
.

Example ABAP Coding Release of an Excel object.
DATA app TYPE ole2_object.

CREATE OBJECT app 'Excel.Application' NO FLUSH.
...
FREE OBJECT app NO FLUSH.
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved




FREE_MEM_ID_OBSOLETE
FROM_CLAUSE




comments powered by Disqus