heliconialabs / steampunkification

Notes and snippets for Steampunk compatibility
The Unlicense
28 stars 8 forks source link

Create UUIDs #1

Closed oblomov-dev closed 1 year ago

oblomov-dev commented 1 year ago

When i got the idea of this repository right and you want to collect abap snippets compatible to every language version and maybe also to low releases, then maybe this code snippet for creating uuids is right here?

      METHOD get_uuid.

         DATA uuid TYPE sysuuid_c32.

         TRY.
             CALL METHOD ('CL_SYSTEM_UUID')=>create_uuid_c32_static
               RECEIVING
                 uuid = uuid.

           CATCH cx_sy_dyn_call_illegal_class.

             DATA lv_fm TYPE string.
             lv_fm = 'GUID_CREATE'.
             CALL FUNCTION lv_fm
               IMPORTING
                 ev_guid_32 = uuid.

         ENDTRY.

         r_result = uuid.

       ENDMETHOD.

Figuring out at the moment if can i bring ABAP2UI5 to a single codeline which is ready to activate in every system (no matter if it deployed to steampunk or abap v702). if this is the idea of steampunkification, this is very great!

larshp commented 1 year ago

yea, feel free to open a pull request to add it

I'm currently just trying to collect stuff, there is no real structure to the document(yet)

oblomov-dev commented 1 year ago

yes but could become a very useful collection! added now the UUID generation.

larshp commented 1 year ago

cool, merged, closing