Ansicht
Dokumentation

ABENBDL_EARLY_NUMB - BDL EARLY NUMB

ABENBDL_EARLY_NUMB - BDL EARLY NUMB

Vendor Master (General Section)   General Data in Customer Master  
This documentation is copyright by SAP AG.
SAP E-Book

- early numbering

...
early numbering
...


Effect

Defines unmanaged early numbering for all primary key fields of a business object entity. Unmanaged early numbering means:

  • The key value for an instance is available in the transactional buffer instantly after the MODIFY request for CREATE (which is why it is called early numbering, as opposed to late numbering).

Unmanaged early numbering is defined in the entity behavior characteristics for each entity behavior definition separately. That means that some business object entities may use unmanaged early numbering, while others use different methods to fill the primary key fields. The affected key fields must be specified as readonly.

Currently available for managed RAP BOs and for unmanaged, draft-enabled RAP BOs. In a projection business object, early 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 a managed BDEF that defines unmanaged early numbering for the root view entity DEMO_RAP_EARLY_NUMBERING. The primary key field KeyField is defined as readonly.

The ABAP behavior pool implements the local handler class earlynumbering_create. This class uses the class cl_abap_random_int to generate a random integer value for the primary key field for each entity instance.

Code snippet:

You can see the complete source code in the BP_DEMO_RAP_EARLY_NUMBERING===CCIMP.

  • It creates three entity instances by specifying a value for the field CharField.

  • 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 unmanaged early numbering.

Result: the values for the primary key field KEY_FIELD are generated automatically.

IMAGE @@ABDOC_NUMBERING.png@@165@@104@@




BAL Application Log Documentation   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.

Length: 6006 Date: 20240501 Time: 232318     sap01-206 ( 70 ms )