SET PROPERTY OF obj p = f.
Sets the property
p of the object obj
according to the contents of the field f.
The
object obj must be of type OLE2_OBJECT.
Normally, all consecutive OLE statements are buffered by the ABAP processor and sent to the presentation
server in bundled form. This means that it is possible for a statement to refer to the results of preceding
statements.
In debugging, however, you should remember that the values of the return parameters
cannot be displayed until directly before execution of the first ABAP statement external to OLE.
Even
a command which refers to an object not yet generated by any OLE statement terminates the bundling.
The return code value of SY-SUBRC indicates whether
all the bundled commands have been successfully executed.
The Return Code is set as follows:
In the last 3 cases, a dialog box containing an error note is displayed on the presentation server.
SET PROPERTY belongs to a group of key words that
allows you to process external objects with ABAP/4. At present, only the object model OLE2
is supported, i.e. all objects must be of type OLE2_OBJECT.
This type and other necessary data are defined in the include program OLE2INCL.
... NO FLUSH
The addition NO FLUSH continues the collection process,
even if the next command is not an OLE statement. This means that you can set a series of properties
in a loop and download them to the presentation server in a single transport operation.
If you do
not use NO FLUSH, you must ensure that you do not rely
on the contents of return parameters not yet filled.
Also, all objects must be initialized in a
bundle, i.e. they must be generated by an OLE call that has already been executed.
Every FREE statement always causes a download of the buffer.
Set the attribute 'Visible' of an EXCEL worksheet.
INCLUDE OLE2INCL.
DATA EXCEL TYPE OLE2_OBJECT.
CREATE OBJECT EXCEL 'Excel.Application'.
SET PROPERTY OF EXCEL 'Visible' = 1.
GET PROPERTY
CALL
METHOD
CREATE OBJECT
FREE OBJECT