Ansicht
Dokumentation
ABENBDL_LATE_NUMBERING - BDL LATE NUMBERING
SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up Fill RESBD Structure from EBP Component StructureThis documentation is copyright by SAP AG.
- late numbering
...
late numbering
...
Effect
Defines internal late numbering for all primary key fields of a business object entity. Internal late numbering means:
- The RAP runtime engine assigns values to the primary key fields.
- In the ABAP behavior pool, the RAP saver method adjust_numbers must be implemented to assign a final primary key value for each entity instance.
- The key value for an instance is assigned just before the instance is saved on the database. Thus, a gapless assignment of unique keys is ensured.
Internal late numbering must be defined in the entity behavior characteristics for each entity behavior definition separately. If the parent node of an entity defines late numbering, then its direct child node must also define late numbering.
When using late numbering for a draft-enabled scenario, it is mandatory that the RAP draft table has an additional key field DRAFTUUID of data type raw(16).
Availability
- Managed and draft-enabled RAP BOs
- Unmanaged and draft-enabled RAP BOs
In a projection BO, late numbering is automatically reused from the base BDEF and doesn't need to be explicitly defined. For details, see topic CDS BDL - entity behavior characteristics, projection BDEF.
For further conceptual background on early and late numbering, see the development guide for the ABAP RESTful Application Programming Model, section Numbering.
Notes
Alternative options for numbering:
Example
The following example shows an unmanaged BDEF that defines late numbering for the root view entity DEMO_UNMANAGED_LATE_NUMBERING.
This BDEF deliberately leaves out strict mode for the sake of brevity. SAP recommends always using strict mode.
The ABAP behavior pool implements the local handler class adjust_numbers. In this class, values are defined for the primary key field key_field. The first new entity instance is assigned the value '1' and each new entity instance is assigned the next higher integer.
Code snippet:
You can see the complete source code in the BP_DEMO_UNMANAGED_LATE_NUMBERICCIMP.
- The ABAP program DEMO_RAP_UNMANAGED_LATE_NUMB uses EML to access to RAP business object and performs the following steps:
- It creates three entity instances by specifying a value for the field data_field1_root.
- It commits the three new entity instances to the database.
- Using the SELECT statement, it displays the content of the database table. It can be seen that the primary key field KEY_FIELD of each entity instance contains a value, which was generated by means of late numbering.
Result: the values for the primary key field KEY_FIELD are generated automatically.
IMAGE @@ABDOC_LATE_NUMB.png@@219@@97@@CPI1466 during Backup BAL Application Log Documentation
This documentation is copyright by SAP AG.
Length: 6453 Date: 20240426 Time: 215251 sap01-206 ( 63 ms )