Introduction to Business Objects

Team-Fly

Business objects and OOP (Object-Oriented Programming) are based on the same concepts. In general, a business object is a tangible item used in a business environment, such as a material, a customer, an employee, or a sales order. As in object-oriented programming, business objects can have variables and methods and can inherit properties from other objects. Variables and methods in the BOR can be related to the object definition or to an instance of the object. This idea is similar to the Class and Instance variables for OOP. Objects are created through a tool called the Business Object Builder seen in Figure 12.1.

The properties of an object can be seen through the Object Builder. Figure 12.2 shows the detail for the EMPLOYEEI object.

A business object has four parts, or levels. The first part, the kernel, represents the data or variables that actually make up the object itself. The second part, the integrity level, is where we define how the object works in the overall business model, that is, how objects are related to each other. The third part, the interface level, basically contains the methods that are implemented to access the object. The fourth and final part is the access level, which defines how external applications access the data. The levels are shown in Figure 12.3.

The Business Object Repository is used not just to define objects within SAP, but also to define outside interfaces to SAP. For instance, if an outside vendor supplies an ATP (Available to Promise) engine for your instance of SAP or a software package to calculate taxes based on geographic location, the applications can be configured in the BOR so that all SAP (or your Java program) has to do is call a BAPI to access the software.

click to expand

Figure 12.1: The opening screen of the Business Object Builder (transaction SWO1)

click to expand

Figure 12.2: The details of the EMPLOYEEI object

click to expand

Figure 12.3: The layers of an SAP business object

You need to be able to use the correct terminology when discussing business objects. Following is a list explaining how SAP defines the various components of a business object. Note the slight difference in wording, such as object type instead of class (the object-oriented term).

  • The object type describes the features common to all instances of that object type. This description includes information such as the object type's unique name, its classification, and the data model. In OOP, this field is called class.

  • The key fields determine the structure of an identifying key, which allows an application to access a specific instance of the object type. The object type Employee and the key field Employee.Number are examples of an object type and a corresponding key field. In addition to being used to identify objects, key fields are also instance attributes (variables) for the object.

  • A method is an operation that can be performed on a business object and provides access to the object data. A method is defined by a name and a set of parameters and exceptions which the calling program must provide. BAPIs are examples of such methods. Methods are typically implemented through function modules.

  • An attribute contains data about a business object, thus describing a particular object property. For example, Employee.Name is an attribute of the Employee object type.

  • An event indicates the occurrence of a status change to a business object. Generally, you use events to trigger actions, such as using a Business Workflow event if a certain operation is performed on an instance of the object type. A good example is the creation of a workflow when a material is created.


Team-Fly


Java & BAPI Technology for SAP
Java & BAPI Technology for SAP
ISBN: 761523057
EAN: N/A
Year: 1998
Pages: 199

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net