Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Data Interfaces and Communication Interfaces →  ABAP and OLE 

SET PROPERTY - OLE

Short Reference

Other versions: 7.31 | 7.40 | 7.54

Syntax


SET PROPERTY OF ole attr = dobj [NO FLUSH] 
                                [EXPORTING p1 = f1 p2 = f2 ...].

Extras

1. ... NO FLUSH

2. ... EXPORTING p1 = f1 p2 = f2 ...

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 1

... NO FLUSH

Effect

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

Addition 2

... EXPORTING p1 = f1 p2 = f2 ...

Effect

The EXPORTING addition can be assigned to the parameters p1 p2 ... of the attribute's actual parameters f1 f2 ..., and the data type of the data object f1 f2 ... complies to the requirement of the attribute.


Example

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

DATA app TYPE ole2_object. 

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