Skip to content

Instantly share code, notes, and snippets.

@cbuckowitz
Last active December 8, 2017 19:41
Show Gist options
  • Save cbuckowitz/4f78cbbec77b6884e9e9389344608620 to your computer and use it in GitHub Desktop.
Save cbuckowitz/4f78cbbec77b6884e9e9389344608620 to your computer and use it in GitHub Desktop.
create UUID #SAP #ABAP

Class CL_UUID_FACTORY is referenced in the sap standard documentation to create uuid's.

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.
DATA lv_uuid TYPE SYSUUID_C26.
lv_uuid = cl_system_uuid=>create_uuid_c26_static( ). "UUID in Base32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment