Prerequisites
BAPIs expect a large number of structured data types and/or tables. To help you pass properly typed parameters when calling them, the R/3 desktop integration components therefore provide a set of objects encapsulating structures and tables.
Procedure
To create the objects for passing data easily to BAPIs, use the DimAs method.
The DimAs method has the following syntax:
Object.DimAs(Object BusinessObject, String Method, String Parameter)
DimAs
has the following parameters:This is the name of the object used in the application to identify the SAP business object. It is returned from a previous call to GetSAPObject.
This is the name of the BAPI to which the parameter belongs. It is a case-sensitive string and must match one of the BAPIs for the SAP business object Object, as defined in the BOR.
This is the name of the parameter whose structure or table object is retrieved. It is a case-sensitive string and must match one of the parameter names of the BAPI Method, as defined in the BOR.
For each BAPI, the BAPI ActiveX control maintains a collection of R/3 tables represented by a tables collection object. To get the definition of a specific table or structure, call the DimAs method and specify the business object type, the BAPI method and the parameter name. This returns the table or structure object requested. The object hides the internal table passed from the native RFC interface and handles the data read from or written to the R/3 System. It also provides a full two-dimensional view of the internal table.
You can find the expected type in the parameter definition of the requested BAPI in the Business Object Repository (BOR).

1. Get the OrderPartners table object with the DimAs method
Set oPartners = oBAPICtrl.DimAs(boOrder, "CreateFromData", "OrderPartners")
2. Set values of parameter OrderPartners
3. Call the method

From the point of view of the calling program, only export parameters have to be initialized with DimAs. The data can then be filled in the retrieved table object or structure object. These parameters are defined as import parameters of the BAPI function module.
You can pass uninitialized objects to parameters that receive return values. These parameters are defined as export parameters of the BAPI function module.