Local Object Hierarchy
The BAPI ActiveX control manages its own hierarchy of local business objects that includes:
Collection objects are collections of business objects. At runtime, local business objects take on the personality of the SAP business objects to which they are attached.
Since the BAPI ActiveX control manages access to all other objects, you must request the creation of a BAPI ActiveX control object (i.e. an instance of the BAPI ActiveX control) in your program before you can access any other object types. When you have done this, you can add business objects and process them by accessing properties and calling methods.
Business objects
You create business objects either explicitly in the client program, or implicitly through the BAPI ActiveX control as a return value from a method invocation. When creating a business object, the client program or the Business Object Broker (BOB) specifies the object type needed. Once created, each business object responds only to the properties and methods of its own object type, as specified in the BOR. The business object instance on the desktop dynamically adapts its interface to the interface of the SAP business object in the R/3 System to which it is connected.
Business objects are only "alive" while the BAPI ActiveX control object that created them remains logged on to the R/3 System. If an unhandled exception occurs in the R/3 System, the RFC connection may be broken. You must then reconnect to each object.
Collection objects
Collection objects are sets of business objects, which the programmer can process as a list. In particular, collection objects provide methods for iterating over the objects in the set. For more information, see
Creating Collection Objects.