The Business Object Proxy Classes 

The Business Object Proxy Classes category contains classes that are used as proxy classes for the business objects themselves. For example, for the business object ProfitCenter, there is a Java class jboProfitCenter that can be used as proxy class. In the class jboProfitCenter , there are member functions defined and implemented to execute the call to the business object methods of the same name. For example, the method in the Business Object Repository ProfitCenter.Getdetail can be called using jboProfitCenter.getdetail() . Likewise, PurchaseReqItem.Getlist can be called using jbo PurchaseReqItem.getlist() .

The Business Object Proxy Classes are defined in cbo<business_object_name>.h and are implemented in cbo<business_object_name>.cpp.

BAPI Method Categories

There are 3 categories of BAPI methods: factory, instance and class.

Business Object Identification Key

Most of the business objects in R/3 database are identified using a unique identification key, and therefore the corresponding proxy object running in the desktop application should also hold the identification key. The application program using a proxy object must use the key when calling BAPI methods that operate on specific instances of business objects. For example, when a desktop application program needs to call ProfitCenter.Getdetail to obtain detail information on a specific profit center, then the identification key of the proxy object must be correctly set to indicate the particular profit center whose detail information is desired. The key is implemented using the jboKey class, defined in jboKey.h.

Each identification key consists of one or more fields, called keyfields. The content of individual keyfield can be read or written using getter and setter functions in the jboKey class. The entire key is used for identifying a particular instance of a business object in R/3, and therefore all keyfields need to be set correctly.

All of the business object proxy classes are derived from class CBoBase , which holds attributes common to all business object proxy classes such as business object name, type, and the identification key. The application program uses the jboBase.getKey() function to access the jboKey attribute in any business object proxy object, and the jboKey class offers functions to set and retrieve the values of individual fields in the identification key itself.

Construction of Proxy Objects

The construction of a Java proxy object for a business object is done using the constructors in the classes of the Business Object Proxy Classes category. There are 2 general ways of constructing a proxy object:

  1. Using a constructor that takes a parameter container class object as argument: this type of constructor internally makes a BAPI factory method call to R/3 to create a new instance of the business object. By doing so, the newly constructed proxy object becomes the proxy object for the newly created business object in R/3. Care must be taken that the parameter container object to be passed as argument be filled with appropriate input data.
  2. Using a constructor that does not take a parameter container class object as argument: this type of constructor is used to construct an empty proxy object first, then the application program can use the jboBase.getKey() function to set the identification key for the purpose of designating the newly constructed proxy object to represent the R/3 business object instance holding the same identification key.

See also:

The jboBase Class

The jboKey Class