ABAP Keyword Documentation → ABAP − Reference → ABAP RESTful Programming Model → Behavior Definitions → ABAP BDL → ABAP BDL - DEFINE BEHAVIOR
ABAP BDL - DEFINE BEHAVIOR, alias
Other versions:
7.31 | 7.40 | 7.54
Syntax
... alias AliasName
Effect
Behavior Definition Language (BDL) makes it possible to define an alias name AliasName for a CDS entity.
A BDL alias for an entity makes it possible to introduce a alias name for a CDS entity. This name can be clearer than the entity name itself, since it does not need to be uniquely global in ABAP Dictionary.
The alias name is visible in the method syntax of the behavior implementation of the business object and in the derived types.
The length of an alias name AliasName is restricted to 20 characters.
Example
In the following example, the data from the ABAP flight data reference scenario (or flight data scenario for short) is used. It represents a legacy business logic that can be used to create and edit flight bookings. The CDS view /DMO/I_Travel represents the root node of the business object for managing flight trips. The underlying business model is described in ABAP BDL - Example.
The following example shows the behavior definition for the root entity Travel. The business object whose CDS data model is represented by the root entity /DMO/I_Travel can be given an alias, in this instance Travel.
define behavior for /DMO/I_Travel alias Travel
{
create;
update;
delete;
}