Extending Object Types: Inheritance and Delegation
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.
Entering a delegation type
Before you process "your" object type any further, define it as the
delegation type of the supertype.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.