Ansicht
Dokumentation

ABENBDL_IN_CLASS_UNIQUE - BDL IN CLASS UNIQUE

ABENBDL_IN_CLASS_UNIQUE - BDL IN CLASS UNIQUE

General Data in Customer Master   General Material Data  
This documentation is copyright by SAP AG.
SAP E-Book

- implementation in class unique

... implementation in class ClassName unique

Effect

Specifies an ABAP behavior pool for the RAP business object.

  • functionality that is reused from the projected BO doesn't require an own implementation. The implementation from the projected BO is reused.

There exist different options for notation that define how the implementation is distributed:

In this case, all implementation-relevant parts of all RAP BO entities that don't have an own implementation class are implemented in the same class.
Further behavior pools on entity-level are possible.
If there's an additional implementation on header level, this applies to all entities which don't have an own implementation class.
  • The behavior pool can be defined within the entity behavior body for one or more implementation groups. Each group must have an own implementation class, while entities must not have an implementation class. An additional implementation class on header level is possible.

The behavior for a certain entity or group can only be implemented in the specified behavior pool. Any other class that attempts this will get an error message.

The mandatory addition unique defines that each operation can be implemented exactly once.

Note

  • If BDEF strict mode is enabled, it is mandatory to specify an ABAP behavior pool as soon as there are any implementation-relevant operations (an exception is a managed BDEF that contains, for example, only standard CRUD operations). The addition unique is also mandatory and leads to a syntax check error if left out.

Example

Behavior definition with behavior pool on header level:

managed implementation in class ClassName unique;
  define behavior for CDSEntityName alias AliasName
   ...


Behavior definition with behavior pool on entity level:

managed;
  define behavior for CDSEntityName alias AliasName
    implementation in class ClassName unique;
   ...


Behavior definition with implementation groups. Each group has its own implementation class. An implementation class on header level is required to implement the unmanaged save.

managed implementation in class ClassName unique;
  define behavior for CDSEntityName alias AliasName
    with unmanaged save
{
group one implementation in class Class1 unique { ... }
group two implementation in class Class2 unique { ... }
...
}
   ...






CL_GUI_FRONTEND_SERVICES - Frontend Services   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.

Length: 6360 Date: 20240420 Time: 040508     sap01-206 ( 59 ms )