ABAP Keyword Documentation → ABAP − Reference → ABAP RESTful Programming Model → Behavior Definitions → ABAP BDL → ABAP BDL - DEFINE BEHAVIOR
ABAP BDL - DEFINE BEHAVIOR, in class unique
Other versions:
7.31 | 7.40 | 7.54
Syntax
... [implementation] in class ClassName unique
Effect
A behavior definition can specify one or more global classes that allow the behavior implementation of a business object. This can be specified in two places:
- In the header of the business object behavior definition.
define behavior for CDSEntityName alias AliasName
...
or
- In the behavior definition of each CDS entity.
define behavior for CDSEntityName alias AliasName
implementation in class ClassName unique
...
A specification for each business object applies to all entities that do not have their own specification for define behavior (that is, a definition for a single entity overwrites the definition for each business object).
Effect of specifying in class ClassName unique:
- Behavior for the entity in question can only be implemented in a behavior pool with the specified name ClassName. Any other class that attempts this raises an ABAP Compiler error.
- An operation (a standard operation or an action) must not be implemented multiple times in different handler classes. Each operation on an entity can be implemented no more than once