Numbering
Road Map for Learning Numbering in RAP
Early numbering:
The numbering type early numbering refers to an early value assignment for the primary key field. In this case, the final key value is available in the transactional buffer instantly after the MODIFY request for CREATE.
1. External Early Numbering:
- consumer provides key
- Key should be unique
- key should be editable in create, and non-editable in modify. syntax:

2. Managed Internal Early Numbering:
- Managed early numbering is only possible for key fields with ABAP type raw (16) (UUID) of BOs with
implementation type managed.
- UUID is read-only. syntax:

3. Unmanaged Internal Early Numbering:
- Unmanaged Early Numbering is available in Managed and Unmanaged Implementation Scenarios with Draft Capabilities
- Key is read-only. Syntax:
Bdef:

Local handler class:

Late numbering:
- The RAP runtime engine assigns values to the primary key fields.
- In the ABAP behaviour 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.
- Late numbering is available for managed and unmanaged implementation scenarios with and without draft.

Note:
- late numbering can't be external, since a consumer can't influence the SAVE sequence after the point of no return.
- If draft enabled, it is mandatory that the RAP draft table has an additional key field DRAFTUUID of data type raw (16).
Summary:
- passed externally by the application user: External numbering
- set internally by the framework: Managed internal
- set internally by developer (implementation the FOR-NUMBERING method): Unmanaged Internal
