CREATE
Basic form
CREATE OBJECT obj class.
Addition
... LANGUAGE langu
Effect
Generates an object of the class class .
To address an OLE automation server (e.g. EXCEL) from
ABAP/4 , the server must be registered with SAP. The transaction
SOLE allows you to assign an automation server
to a class.
The CREATE statement generates the initial object and this can
be processed further with the relevant key words.
The return code value of SY-SUBRC indicates the result of the
generation:
The return code value is set as follows:
SY-SUBRC = 0
Object successfully generated.
SY-SUBRC = 1
SAPGUI communication error.
SY-SUBRC = 2
SAPGUI function call error. The OLE
function modules are implemented only under Windows.
SY-SUBRC = 3
The OLE API call resulted in an error; this is
possibly a storage space problem.
SY_SUBRC = 4
The object is not registered with SAP.
Addition
... LANGUAGE langu
Effect
Determines the language chosen for method and attribute
names of the object class.
If no specification is made, English is the default.
CREATE OBJECT
Example
Generate an EXCEL object.
-
INCLUDE OLE2INCL.
DATA EXCEL TYPE OLE2_OBJECT.
CREATE OBJECT EXCEL 'Excel.Application'.
Related
SET PROPERTY
GET PROPERTY
CALL METHOD
FREE OBJECT
Index
© SAP AG 1996