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

    RAP - group

    Syntax


    ...
    group Group1 implementation in class Class1 unique 
    {
      // implementation-relevant content
    }
     
    group Group2 implementation in class Class2 unique 
    {
      //implementation-relevant content
    }
     
    [group Group3 ...] 
    ...

    Description


    Grouping divides the implementation-relevant parts of a business object's business logic into multiple groups for behavior implementation. Each group is assigned to a separate implementation class. This allows the implementation of a business object to be divided technically into multiple parts. Otherwise, the implementation could be done only by one person at a time, since the CCIMP include prevents simultaneous work.

    If used, the following implementation-relevant parts of a BDEF must be included in a group (in both a managed and an unmanaged RAP BO):

    Not allowed within a group is:

    Optionally inside or outside of a group:

    • In a managed RAP BO, create, update, and delete and operations for associations can be specified either inside or outside of a group.
    • Field additions that do not require an implementation.

    Further rules:

    • When grouping is used, an implementation class on entity level is not allowed.
    • An implementation class in the RAP behavior definition header that applies to the complete BO with all subnodes is allowed.
    • Different groups can be implemented in the same implementation class.
    • The group names Group1, Group2, ... must not conflict with actions, determinations, or validations of the same name.
    • For RAP BO consumers, the group names are irrelevant and therefore, group names can be changed retrospectively.
    • Associations can only be assigned as a whole to a group and therefore, read-by-association and create-by-association must be implemented in the same class.

    Further Information