Creating the Base-level Control 

Controls are usually made up of collections of objects. For example, the Function control contains Function objects, and the Transaction control contains Transaction objects. The highest level of a control - the base-level control - is either an actual collection object (like the Functions collection object) or a single control object (like the Table Factory object).

Controls also maintain some properties or objects common to all their sub-objects. Examples are the R/3 Connection (an object shared by all Functions or Transactions in a collection) or the Count property (the number of objects in a collection).

To create the base-level control, you use the CreateObject function and a fixed request string. This string specifies the kind of control (i.e. "SAP.TableFactory.1") and causes creation of the relevant base-level object. For example:

transactionsOCX = CreateObject( " SAP.Transactions " )

For the SAP OCX controls, the fixed strings are:

CreateObject String

OCX control

Highest (base-level) object

Fixed String

Function control

Functions collection object

" SAP.Functions "

Transaction control

Transactions collection object

" SAP.Transactions "

Logon control

Logon object

" SAP.LogonControl "

Table Factory control

Table Factory object

" SAP.TableFactory "

Table View control

Table View object

" SAP.TableViewControl "

Table Tree control

Table Tree object

" SAP.TableTreeControl "

 

For more information, see SAP Control Base Classes.