SAP BDL DEFINE BEH INTERFACE



Get Example source ABAP code based on a different SAP table
  


• DEFINE BEHAVIOR FOR ABAP_BDL_INTERFACE
• ALIAS ABAP_BDL_INTERFACE

ABAP_RAP - Entity Behavior Definition, Interface BDEF

ABAP_SYNTAX
define behavior for ProjectedEntity $[alias AliasName$] $[external ExternalName$]
$[use etag$]
{
entity behavior body
}

$[behavior for ChildEntity1$]$[, behavior for ChildEntity2$]$[, ...
$]

What does it do?
Defines the behavior for a RAP BO interface in the RAP BDL . An interface behavior definition can project a subset or all of the nodes of its underlying base BO. The root entity ProjectedEntity must be a CDS transactional interface.
Syntax additions and components:
An alias name should be specified using the keyword alias. This name can be clearer than the entity name itself, since it does not need to be uniquely global in ABAP Dictionary . The length of an alias name AliasName is restricted to 30 characters. If no alias name is specified, a syntax check warning occurs .
The optional addition external can be used to provide an alias name for external usage. This external name can be used, for example, if another projection layer is built on top of the interface BDEF. It can be much longer than the alias name.
Only one entity behavior characteristic is available, namely use etag. An ETag field for optimistic concurrency control can be reused if it is specified in the base BO.
For details on optimistic concurrency control, see topic RAP BDL - ETag.
For details on reuse, see topic RAP BDL - use.
The entity behavior body can expose a subset of the transactional behavior or the base BDEF, for example, RAP BO operations.



Latest notes:

The following entity behavior characteristics are reused automatically, if applicable, and therefore must not be defined again in an interface:
RAP authorization control for RAP BO operations.
RAP persistent table
RAP draft table
Saving options
RAP locking: Interfaces inherit the lock master and lock dependent relations. Upon each modify operation on an interface instance, the method FOR LOCK is called and the respective entities are locked.
RAP early numbering
RAP late numbering
NON_V5_HINTS
ABAP_HINT_END

ABAP_EXAMPLE_VX5
The following example shows an interface BDEF. The projected BO is DEMO_RAP_UNMANAGED_DRAFT_ROOT. The interface BDEF reuses draft handling and standard operations from the underlying BO. It also defines a foreign entity and excludes a field from the BDEF derived types.
BDEF DEMO_RAP_INTERFACE_DRAFT
ABAP_EXAMPLE_END