What does it do? Defines a RAP behavior definition in the RAP BDL >. A RAP behavior definition consists of a RAP behavior definition header> and one or more entity behavior definitions >. The header can define the following attributes for the entire business object. The implementation type is mandatory, all other attributes are optional.
implementation type>: four different implementation types exist: managed>, unmanaged>, abstract>, projection>.
saving options>:
The default save sequence> can either be enhanced or switched off and overwritten with a user-defined saving strategy.
Can be defined either in the BDEF header > and then applies to all entities of the business object. It is also possible to define saving options as an entity behavior characteristic / entity behavior characteristics >.
If specified, an implementation in the ABAP behavior pool> is required.
Only available for managed implementation scenarios>.
implementation in class ClassName unique>>: specifies one or more classes which allow the behavior implementation of a business object. In a managed scenario, this is optional and required only if unmanaged components are added to the managed implementation.
strict$[(version)$]>>: switches on BDEF strict mode>. Handled by the RAP framework>.
extensible>>: if specified, BDEF extensions> are allowed. Handled by the RAP framework>. Currently, only available for managed implementation scenarios.
with draft>>: enables the draft concept for a business object. This allows users to save their changes as draft and resume editing at a later point in time. Handled by the RAP framework>.
with privileged mode disabling ContextName>>: Enables BDEF privileged mode. The effect is that the authorization context> ContextName > is automatically disabled when a RAP BO consumer accesses the business object in question with a privileged EML call>.
foreign entity>>: Defines an entity which is not part of the BO structure as component for the response structures, thus enabling message mapping for other BOs. The behavior definition header is followed by
either an entity behavior definition> that starts with define behavior for>
or by the definition of an authorization context> that starts with define $[own$] authorization context>>.
ABAP_EXAMPLE_VX5 The following example shows a managed BDEF based on the CDS root view entity DEMO_SALES_CDS_BUPA_2>>. The BDEF header consists only of the implementation type, in this case, managed>. ABAP_NOTE This example does not fully meet the requirements of the RAP BO contract>. It is intentionally kept short and simple and serves demonstration purposes only. See more information on the RAP BO contract in the Development guide for the ABAP RESTful Application Programming Model>. BDEF DEMO_SALES_CDS_BUPA_2 ABAP_EXAMPLE_END