Posted: Sun Feb 24, 2008 5:25 pm Post subject: SAP Business Objects (Бизнес объекты)
SAP Business Objects
Business object technology and programming are based on the concept of business objects. Real objects, such as an employee or a sales order, can be represented as business objects in business application systems, such as the SAP Systems.
SAP business objects encapsulate SAP data and business processes while hiding the structure and implementation details of the underlying data.
To achieve this encapsulation, SAP business objects are created as entities with several 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 for consistent embedding in the environment and the constraints regarding the values and domains 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 for external access to the object’s data, for example, COM/DCOM ((Component Object Model/Distributed Component Object Model). It specifies the technologies that enable object data to be accessed from external programs, for example, COM/DCOM (Component Object Model/Distributed Component Object Model).
The graphic below illustrates the different layers of a business object.
Integration Accessing Business Objects
As the graphic shows, the interface layer separates a business object's data and the applications and technologies that are used to access it. To the outside, SAP business objects reveal only their interface, which consists of a set of clearly defined methods. Applications can only access the business object data through the object's methods.
An application program wanting to access an SAP business object and its data, only needs the information required to execute the methods. Therefore, application programmers can work with SAP business objects and call their methods without having to know anything about the object's underlying implementation details.
The set of methods 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".
In an SAP System, all SAP business object types and their methods are defined 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 actual SAP business objects that can exist in an SAP System; that is, each SAP business object is a representation, or instance, of its object type. For example, the employee with the name Charlie Jones and the employee number 1234 is an instance of the Employee object type.
When writing object-oriented application programs, developers identify the object types that are to be used in their programs. At runtime, the application program accesses the specific instances of the defined object types.
If an application program uses an instance of a business object, the object instance responds only to the set of characteristics and methods defined for its own object type. 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 activity 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 that can or must be provided by the calling program in order to use the method. BAPIs are examples of such methods.
Attributes - An attribute describes a specific property of a business object. For example, Employee.Name is an attribute of the Employee object type.
Events - An event signals that the status of a business object has changed.
Inheritance 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. The synonyms subclass and superclass are sometimes used for subtype and supertype.
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.
For more information about creating business objects refer to the documentation on SAP Business Workflow.
Define Business Object
OBN in the Business Client is based on a business object in the system together with its methods and parameters.
1. Call transaction SW01.
2. Enter the name of a new business object, or select an existing one.
If you create a new business object, follow the steps in the following:
a. Create Object Type
b. Define Methods for the Object Type
c. Define Method Parameters
3. Ensure that your business object contains at least one method with parameters.
Keep in mind the option to Redefine the methods Display and ExistenceCheck.
Example using business object SFLIGHT in SWO1:
Parameters for Flight.GetList and Flight.GetDetail:
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.