ABAP Keyword Documentation →  ABAP − Reference →  Data Interfaces and Communication Interfaces → 

System Class for UUIDs

The methods of the class CL_SYSTEM_UUID create UUIDs in different formats, such as 16-character byte-likeUUIDs, 22-character character-like UUIDs with uppercase and lowercase letters, and 32-character character-like UUIDs in hexadecimal. They also make it possible to convert the UUIDs from one type to another.

Example

Creating a 32-character UUID.

DATA: system_uuid TYPE REF TO if_system_uuid,
      uuid TYPE sysuuid_c32.

system_uuid = cl_uuid_factory=>create_system_uuid( ).

TRY.
    uuid = system_uuid->create_uuid_c32( ).
  CATCH cx_uuid_error.
    ...
ENDTRY.