Ansicht
Dokumentation

ABENCONVERT_KEY - CONVERT KEY

ABENCONVERT_KEY - CONVERT KEY

CL_GUI_FRONTEND_SERVICES - Frontend Services   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.
SAP E-Book

- CONVERT KEY

COMMIT ENTITIES BEGIN
  ...
  CONVERT KEY OF entity_name
  FROM pre_key
  TO   key.

COMMIT ENTITIES END.


Effect

For entities with late numbering, the statement MODIFY provides only temporary keys. For these temporary keys, a successful save method draws finalized keys. If, for example, the keys of new instances are passed to a HTTP response, they must be the finalized values and not the temporary values from the MODIFY phase. The statement CONVERT KEY is used for this.

The statement CONVERT KEY may only be used in the context of a block-constructing variant of the statement COMMIT ENTITIES to determine the finalized value of a temporary key. In the context of the statement COMMIT ENTITIES, the runtime of ABAP RAP holds its key registry to respond to queries from the statement CONVERT KEY. In the statement COMMIT ENTITIES END, this information is then deleted.

In its dynamic form, the statement CONVERT KEY is passed the name of the entity and does not perform a static type check.

Remarks

  • Unlike the other EML statements, CONVERT KEY does not operate on tables. This is because the consumer typically iterates across the consumer's own data and needs to fill specific columns. The preceding extraction of all pre_key, following by a mass conversion and insertion of keys in the target table would be more time-consuming and use more resources than repeating the direct individual operation.
  • Within a behavior implementation, the statement CONVERT KEY is allowed only in the SAVE method. If this rule is violated, the runtime error BEHAVIOR_ILLEGAL_STATEMENT occurs.





BAL Application Log Documentation   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.

Length: 3376 Date: 20240427 Time: 001637     sap01-206 ( 30 ms )