Ansicht
Dokumentation

ABAPCONVERT_KEY - CONVERT KEY

ABAPCONVERT_KEY - CONVERT KEY

ROGBILLS - Synchronize billing plans   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.
SAP E-Book

CONVERT KEY

CONVERT KEY OF bdef
  FROM $[TEMPORARY$] pre_key
  TO final_key.

Effect

This statement is only possible between COMMIT ENTITIES BEGIN, END.

Syntax Part Details
CONVERT KEY OF bdef. Specifies the RAP BO bdef for which the keys should be converted. In contrast to other EML statements, the CONVERT KEY OF statement does not operate on mass data, i. e. internal tables, but on single values (pre_key, final_key). The CONVERT KEY statement is only possible in this context.
FROM [TEMPORARY] pre_key Specifies the value of the preliminary key pre_key. The type of pre_key must be compatible with %pid or %pre in case of using the addition TEMPORARY. \lbr \lbr The addition TEMPORARY is only relevant in late numbering scenarios in which %key is used to contain the preliminary keys during the RAP interaction phase - instead of %pid. \lbr \lbr For more information on the use of %pid, %pre and %key in the context of late numbering scenarios, see the topic Use of Keys and RAP BO Instance Identifiers in a Nutshell.
TO final_key. final_key specifies the final key value. The type of final_key must be compatible with the primary key's type.

Example

The following source code section taken from DEMO_RAP_EML_COMMIT_3 demonstrates the COMMIT ENTITIES BEGIN ... END variant and CONVERT KEY OF.

Example

The following source code section taken from DEMO_RAP_DERIVED_TYPES_LATENU2 demonstrates the COMMIT ENTITIES BEGIN ... END variant and CONVERT KEY OF with the addition TEMPORARY.

COMMIT ENTITIES BEGIN RESPONSES FAILED DATA(failed_late)
     REPORTED DATA(reported_late).

    LOOP AT mapped_early-demo_umanaged_root_late_num3
      ASSIGNING FIELD-SYMBOL(<mapped_early>).

      CONVERT KEY OF demo_umanaged_root_late_num3
        FROM TEMPORARY VALUE #( %pid = <mapped_early>-%pid
                                %tmp = <mapped_early>-%key )
        TO DATA(lv_final_key).
    ENDLOOP.

    COMMIT ENTITIES END.







Addresses (Business Address Services)   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.

Length: 4788 Date: 20240329 Time: 063721     sap01-206 ( 64 ms )