Start of Content Area

Procedure documentation Extending Object Types: Inheritance and Delegation  Locate the document in its SAP Library structure

Use

In particular situations you will need to modify an object type in conjunction with delegation rather than create a new object type. This applies whenever you want to add components to an object type which are not provided in the standard version and at the same time need to ensure that productive scenarios with the original SAP object type remain operational.

If no modifications are required, you can use any released object type provided by SAP as it is.

Conventions for the other sections of the tutorial

The procedure described below consisting of create subtype and delegation is always required when you have to extend an SAP object type to meet your requirements.

However, within this tutorial it is always assumed that the object type to be maintained did not exist in the Business Object Repository and therefore is created from scratch. This section therefore informs you about the procedure involved in certain extensions, but does not really belong to the tutorial.

Procedure

Creating a subtype

Create a new object type as the subtype of the object type you want to extend. This subtype automatically inherits all the components (methods, attributes, and events) of the original object type including its implementation.

  1. Choose Tools Business Workflow Development Definition Tools ® Business Object Builder.
  2. In the field Object type, enter the object type you want to extend. This is then the supertype in the inheritance hierarchy.
  3. Choose This graphic is explained in the accompanying text Subtype.
  4. For the new object type, enter:
  1. Enter the name of the implementation program of the object type and assign the code letter of your application.
  2. Confirm your entries with This graphic is explained in the accompanying text and save the object type created as a local object or with package in a transport request.

Entering a delegation type

Before you process "your" object type any further, define it as the delegation type of the supertype.

  1. Exit maintenance of the object type and go back to the Business Object Builder. Choose Settings ® Delegation ® System-wide.
  2. Add a new entry to the table. To do this, choose Table view ® Display ® Change, then Edit ® New entries.
  3. Enter the name of the object type (supertype) for which you want to specify a delegation type.
  4. Enter the name of the subtype as the delegation type.
  5. Choose This graphic is explained in the accompanying text.

The delegation entered is cross-client.

In all SAP Business Workflow definition tools, you still have to use the "old" object type (supertype). However, when the definition is read and evaluated (at runtime, for F4 input help, and so on), the definition of the delegation type (subtype) is used.