Ansicht
Dokumentation

ABENBDL_FIELD_NUMBERING - BDL FIELD NUMBERING

ABENBDL_FIELD_NUMBERING - BDL FIELD NUMBERING

Vendor Master (General Section)   ABAP Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

- field numbering

... field(numbering:managed) Field1, Field2, ...;

Effect

Defines managed internal numbering for a RAP BO field. The field in question is automatically assigned values upon creation of a new entity instance. The RAP BO consumer doesn't have to provide any input for those fields.

  • Can be applied only to primary key fields with ABAP type raw(16) (UUID).
  • It is managed by the RAP framework, no implementation in the ABAP behavior pool is required.
  • The field in question can also be defined as readonly to ensure that no values are passed from the RAP BO consumer. However, this is optional. If you do not set the key field to readonly, the key value can also be given by the consumer.

Note

For self-defined numbering, the keyword early numbering is available, see topic CDS BDL - early numbering.

Development guide for the ABAP RESTful Application Programming Model, section Automatically Drawing Primary Key Values in Managed BOs.

Example

The following example shows a managed BDEF that defines internal numbering for the key field key_field.

The ABAP program DEMO_RAP_MANAGED_FIELDS 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 char_field1.
  • It commits the three new entity instances to the database.
  • Using the SELECT statement, it displays the content of the underlying 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 managed early numbering.

Code Snippet:

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

IMAGE @@ABDOC_INTERNAL_NUMB.png@@358@@106@@




Vendor Master (General Section)   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.

Length: 3578 Date: 20240511 Time: 191528     sap01-206 ( 32 ms )