Ansicht
Dokumentation
ABENBDL_IN_CLASS_UNIQUE - BDL IN CLASS UNIQUE
General Data in Customer Master General Material DataThis documentation is copyright by SAP AG.
- implementation in class unique
... implementation in class ClassName unique
Effect
Specifies an ABAP behavior pool for the RAP business object.
- In a managed RAP BO, a behavior pool is not necessarily required. Standard operations and operations for associations work without implementation in a behavior pool. A behavior pool is only required if the behavior definition contains components that can't be handled by the managed RAP BO provider, such as nonstandard operations or validations.
- In an unmanaged RAP BO, an ABAP behavior pool is always required.
- In a projection behavior definition, an ABAP behavior pool is not necessary, but possible:
- functionality that is reused from the projected BO doesn't require an own implementation. The implementation from the projected BO is reused.
- if the projection BDEF defines new actions or functions, an ABAP behavior pool is required.
There exist different options for notation that define how the implementation is distributed:
- The behavior pool can be defined in the CDS behavior definition header.
- 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.
- The behavior pool can be defined in the entity behavior definition for each CDS entity. Each node of a RAP business object can have an own implementation class.
- 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 )