SET PROPERTY - OLE

Short Reference

Syntax

SET PROPERTY OF ole attr = dobj [NO FLUSH].

Addition:

... NO FLUSH

Effect

The attribute attr of an automation object ole is set according to the content of the data object dobj. The automation object must have been generated with the specific statement CREATE OBJECT for automation objects. For the typing of ole, the description in the statement CREATE OBJECT applies. The typing of the data object dobj depends on the properties of the automation attribute attr.

System Fields/>

sy-subrc Meaning
0 Successful transfer of object properties
1 Error in communication to the SAP GUI
2 Error in function call in the SAP GUI
3 Error setting a property
4 Error reading a property

Addition

... NO FLUSH

Effect:

For the effect of the addition NO FLUSH, the description in the statement CREATE OBJECT applies.

Example:

Calling the Office application Excel and displaying an empty Excel table by assigning the value 1 to the attribute "Visible".

TYPE-POOLS ole2.

DATA app TYPE ole2_object.

CREATE OBJECT app 'Excel.Application'.
SET PROPERTY OF app 'Visible' = 1.