SAP Business Objects

Introduction to SAP BO:                  ( Business Objects FAQ)

Business object technology and business object programming are based on the concept of "business objects". Real world objects, for example an employee or a sales order, are modeled as business objects in business application systems, such as the R/3 System.
You can visualize the SAP Business Objects as "black boxes" that encapsulate R/3 data and business processes, thus hiding the details of the structure and implementation of the underlying data.
Structure:
To achieve this encapsulation, the SAP Business Objects are constructed as entities with multiple layers:
  • At the core of an SAP Business Object is the kernel, which represents the object's inherent data.
  • The second layer, the integrity layer, represents the business logic of the object. It comprises the business rules and constraints that apply to the Business Object.
  • The third layer, the interface layer, describes the implementation and structure of the SAP Business Object, and defines the object's interface to the outside world.
  • The fourth and outermost layer of a Business Object is the access layer, which defines the technologies that can be used to obtain external access to the object's data, for example COM/DCOM (Component Object Model/Distributed Component Object Model).
Integration
Accessing Business Objects:
As the graphic shows the interface layer separates a Business Object’s data and the application and technology that can be used to access it. To the outside, the SAP Business Objects reveal only their intercace, which consists of a set of clearly defined methods. Applications can only access the Business Object data by the object’s methods.
An application program that accesses an SAP Business Object and its data only needs the information required to execute the methods. Therefore, an application programmer can work with the SAP Business Objects and invoke their methods without having to know or consider the object's underlying implementation details.
The set of methods that is associated with a Business Object represents the object's behavior. When a method is executed on a Business Object, the method can change the object's internal state, that is, the object's data.
For example, one method that you can use on the Business Object "Employee" is to "check for the employee's existence".
All SAP Business Object types and their methods are identified and described in the Business Object Repository (BOR).
Object Types and Object Instances:
Each individual Business Object belongs to a specific object class, depending on the nature and general characteristics of the object. These object classes are called object types. For example, the individual employees working in an organization are all part of the "Employee" object type.
The object types are descriptions of the actual SAP Business Objects that can exist in R/3; that is, each individual SAP Business Object is a representation, or instance, of its object type. For example, the employee with the name Charles Jones and the employee number 1234 is an instance of the "Employee" object type.
When writing object-oriented application programs, application developers identify the object types that are to be used and operated on by their programs. At runtime, the application program accesses the specific instances of the defined object types.
When an instance of a Business Object is used by an application program, the object instance responds only to the set of characteristics and methods defined for its own object type. The SAP Business Object types are defined by the following:

  • Object type
The object type describes the features common to all instances of that object type. This includes information such as the unique name of the object type, its classification, and the data model.
  • Key fields
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.
  • Methods
A method is an operation that can be performed on a Business Object and that provides access to the object data. A method is defined by a name and a set of parameters and exceptions, which can or must be provided by the calling program in order to use the method. BAPIs are examples of such methods.
  • Attributes
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.
  • Events
An event indicates the occurrence of a status change of a Business Object.
  • Interfaces
Interfaces are groups of related methods associated with an object type.
Integration and Polymorphism:
  One objective and the main benefit of object-oriented technology is software reusability.
The reuse of software code is achieved by deriving new object types from existing ones. When an object type is generated from an existing object type, the new object type is called the subtype and the existing object type is called the supertype. For example, the object type "Employee" is a subtype which has been derived from the supertype "Person". Note that "subtype" and "supertype" are sometimes referred to as "subclass" and "superclass".
A subtype inherits all the properties and methods defined for the supertype from which it descends, but can also have additional properties and methods. A subtype may also implement a different behavior for the methods inherited from the supertype. Polymorphism is the term used to describe when the same method triggers different types of behavior in different Business Object types.