ABAP - Keyword Documentation → ABAP RAP Business Objects → RAP - Behavior Definitions → RAP - BDL for Behavior Definitions → RAP - Managed and Unmanaged Behavior Definitions → 

    RAP - BehaviorDefinitionHeader

    Description


    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 EntityBehaviorDefinition1, EntityBehaviorDefinition2, ... Optionally, one or more RAP authorization contexts AuthorizationContext1, AuthorizationContext2, ... can be specified.

    The header can define the following attributes for the entire business object. The implementation type is mandatory, all other attributes are optional.

    The behavior definition header is followed by

    Example


    The following example shows a managed BDEF based on the CDS root view entity DEMO_RAP_FOREIGN_ENTITY. The BDEF header consists of the following components:

    • the implementation type managed
    • BDEF strict mode version 2, defined using strict(2)
    • a RAP foreign entity, in this case DEMO_SALES_CDS_SO_1
    managed implementation in class bp_demo_rap_foreign_entity unique;
    strict(2);
    //enables MAP_MESSAGES:
    foreign entity DEMO_SALES_CDS_SO_1;

    define behavior for DEMO_RAP_FOREIGN_ENTITY alias RootEntity
    persistent table DEMO_DBTAB_ROOT
    lock master
    authorization master (global)
    {
      create;
      update;
      delete;

      field(readonly:update) key_field;
    }

    Continue