Show TOC Start of Content Area

Background documentation Business Objects  Locate the document in its SAP Library structure

Use

A business object is a semantic entity that represents the smallest data unit to take part in a business scenario.

You use a business object to define persistable data types and to generate database tables. You can specify relations between business objects, persistency and permissions, implement or map basic methods for reading, writing, updating, deleting or querying data.

A business object is a clearly identifiable unit. For each business object node a master table is created. You can change the name of the table on the Persistency tab page.

Example

For a car rental system, you can create the following business objects:

·         Car – with attributes such as license plate number, car model, number of seats, maximum speed, mileage, color

·         Customer – with attributes such as the first name, last name, credit card number, address, phone, fax, e-mail, date of registration

·         Order – with attributes such as the date, invoice number, or price.

You should create associations with the other business objects to specify details about the customer and car.

Business Object Nodes

When you create a new business object, the following nodes appear in the Composite Application Explorer:

This graphic is explained in the accompanying text

All business objects are under this node.

This graphic is explained in the accompanying text

The business object itself

This graphic is explained in the accompanying text

The business object root node

This graphic is explained in the accompanying text

A sample business object subnode

This graphic is explained in the accompanying text

A sample business object subnode

The business object root node is a wrapper representing the root of a business object tree structure. Each business object root node may contain several business object nodes.

When you create a new business object, you can choose one of the following:

      Create the business object node with  a new (empty) structure.

      Create the business object node with an existing (complex) structure.

Business object nodes are not standalone. You must put them under a business object root node.

Attributes

When you create a new business object, the following attributes are created automatically:

      key – the Global Unique Identification (GUID) key of the object

      createdBy – the creator of the object

      createdAt – the time when the object was created

      modifiedBy – the performer of the last change

      modifiedAt – the time of the last change

These attributes are read only and cannot be deleted.

You can also create additional attributes. The attributes of a business object are presented as part of a complex data type.

More information:

      Modeling Business Object Attributes

      Creating and Editing Data Types

Associations

You can create relations between business objects. Associations are the only type of relations that are supported. When the association type is CROSS_BO if an object is deleted, the objects associated to it are not deleted. When the association type is PARENT_CHILD the child business object nodes are deleted together with the parent business object node.

For every association between business object nodes an association table is created.

More information: Defining Business Object Associations

Persistency

Business objects can be persisted locally. CAF utilizes the Enterprise Java Beans (EJB) 3.0 standard and implements persistency using session beans and plain Java objects with the Java Persistence API (JPA) for storing data in the database. CAF creates a database model in the system database of the Application Server (AS) Java that corresponds to the structure of your business objects.

Note

You can extend or entirely replace the functionality that CAF generates in the business objects by overriding the generated methods in the implementation bean class that is created automatically for each business object.

More information: Defining Business Object Persistency

More Information

Creating Business Objects

End of Content Area