Skip to content

ABAP Keyword Documentation →  ABAP − Reference →  ABAP RESTful Programming Model →  Behavior Definitions →  ABAP BDL →  ABAP BDL - Syntax 

ABAP BDL - Structure

A behavior definition consists of a header part and a sequence of entity behavior definitions. An entity behavior definition consists of a section containing properties of the entity plus operations enclosed in curly brackets {}.

The following depicts the syntax structure of a behavior definition that itself defines the transactional behavior of CDS_Entity_name.

/* Header part of the behavior definition */
implementation unmanaged | managed | abstract
       [in class class_name unique];

/* Entity behavior definition */
define behavior for CDS_Entity_name [alias AliasName]

/* Entity properties */
[implementation in class ClassName unique]
[late numbering [in place]]
[etag field | AncestorEntity~Field ( LocalField = MasterField )]
[lock master | dependent ( LocalField = MasterField )]

/* Curly bracket */
{

/* Access restrictions */
field (read only | mandatory) field[, field, ...];

/* Standard Operations*/
[internal] create;
[internal] update;
[internal] delete;

/* Actions */
[internal] [static] action ActionName
       [external LongName]
       [parameter InputParameterEntity|$self]
       [result cardinality OutputParameterEntity|$self];

/* Association */
[internal] association AssociationName
       [abbreviation AbbreviationName] {[[internal;]create;]};

/* Curly bracket */
}

Other versions: 7.31 | 7.40 | 7.54

Rules

  • A property can occur a maximum of once in a behavior definition.

  • If an entity does not occur in the behavior definition, the entity does not have a transactional character (it is read-only).