What does it do? 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 does not have to provide any input for those fields.
Can be applied only to primary key fields with ABAP type raw(16)> (UUID).
Managed internal numbering is only available in managed RAP BOs>.
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.
Latest notes: For user-defined numbering, the keyword early numbering> is available, see topic RAP BDL - early numbering >. NON_V5_HINTS ABAP_HINT_END
ABAP_FURTHER_INFO Development guide for the ABAP RESTful Application Programming Model, section Automatically Drawing Primary Key Values in Managed BOs>.
ABAP_EXAMPLE_VX5 The following example shows a managed BDEF that defines internal numbering for the key field key_field>. ABAP_NOTE This example is intentionally kept short and simple and serves demonstration purposes only. It does not fully meet the requirements of the RAP BO contract>. See more information on the RAP BO contract in the Development guide for the ABAP RESTful Application Programming Model>. BDEF DEMO_RAP_FIELD_CHARACTERISTICS The ABAP class CL_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 AB_SQL 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: ABEXA 01530 Result: values for the primary key field are generated automatically. IMAGE ABDOC_INTERNAL_NUMB.png 358 106 ABAP_EXAMPLE_END