Show TOC

Procedure documentationExtending Object Types: Inheritance and Delegation Locate this document in the navigation structure

 

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 Subtypes

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 Subtype.

  4. For the new object type, enter:

    • A unique name that can be used to identify it

    • An object name

    • A name

    • A short description

  5. Enter the name of the implementation program of the object type and assign the code letter of your application.

  6. Confirm your entries with 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 .

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.