Ansicht
Dokumentation

ABENBDL_PERSISTENT_TABLE - BDL PERSISTENT TABLE

ABENBDL_PERSISTENT_TABLE - BDL PERSISTENT TABLE

ROGBILLS - Synchronize billing plans   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.
SAP E-Book

- persistent table

...
persistent table TableName
...


Effect

DDIC database table a RAP BO is based on. The data on the persistent table is processed by RAP BO operations.

Available only in managed RAP BOs and in these, it is mandatory to specify a persistent table. An exception is raised when the option unmanaged save is chosen. In case of an unmanaged save, a persistent table must not be defined.

In a projection business object, the persistent table is automatically inherited.

Requirements:

  • If the BDEF specifies an ETag field, the persistent table requires a field that is used to describe the state of the database table. This can be, for example, a time stamp field.
If this field is annotated in CDS with the relevant annotation, such as @Semantics.systemDateTime.localInstanceLastChangedAt: true, then it is automatically updated by the RAP framework.
  • If the RAP BO is draft-enabled and has a total ETag field, the persistent table requires a field that is updated whenever the BO instance is changed. This must be a separate field from the ETag master field. The total ETag field is necessary on the lock master entity.
If the total ETag field is a time stamp field and if it is annotated in the CDS data model with the annotation @Semantics.systemDateTime.lastChangedAt, then this field is updated automatically by the RAP framework.
  • If you decide to use UUIDs as primary keys, the following rules apply:
  • Every entity needs a field for the UUID key.

  • Child entities must have a field for their parent's UUID. This is required to define associations for the composition relationship.

  • Any child entity that has no parent-child relationship with the lock master entity must have a field with the lock master's UUID. This is important to define associations to the lock master entity, which is required for ETag handling.

Notes

  • If the field names of the persistent database table differ from the field names of the CDS views, then a type mapping is required in the entity behavior body. This can be the case for example, if the fields of the CDS data model have alias names.

Example

The following example shows a managed BDEF based on the CDS root view entity DEMO_RAP_MANAGED_ASSOC_ROOT. It specifies persistent database tables for the parent and the child entity. Since the field names of the database tables have alias names in the CDS views, a type mapping is specified that maps the fields of the persistent database table to the field names of the CDS views.






ABAP Short Reference   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.

Length: 5977 Date: 20240424 Time: 201149     sap01-206 ( 90 ms )