[ABAP] Eindeutige ID (GUID / UUID) generieren

DATA: l_uuid_x16 TYPE sysuuid_x16.
DATA: l_uuid_c22 TYPE sysuuid_c22.
DATA: l_uuid_c26 TYPE sysuuid_c26.
DATA: l_uuid_c32 TYPE sysuuid_c32.

TRY.
    " verschiedene GUIDs / UUIDs erzeugen
    l_uuid_x16 = cl_system_uuid=>create_uuid_x16_static( ).
    l_uuid_c22 = cl_system_uuid=>create_uuid_c22_static( ).
    l_uuid_c26 = cl_system_uuid=>create_uuid_c26_static( ).
    l_uuid_c32 = cl_system_uuid=>create_uuid_c32_static( ).

  CATCH cx_uuid_error INTO DATA(e_text).
    MESSAGE e_text->get_text( ) TYPE 'I'.
ENDTRY.

WRITE: / | uuid_x16: { l_uuid_x16 } |.
WRITE: / | uuid_c22: { l_uuid_c22 } |.
WRITE: / | uuid_c26: { l_uuid_c26 } |.
WRITE: / | uuid_c32: { l_uuid_c32 } |.