Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

GUID_CREATE - algorithm

Former Member
0 Likes
4,261

How does the function module "guid_create" generate a GUID?

Which algorithm is used?

Thank you for your answers.

10 REPLIES 10
Read only

Former Member
0 Likes
2,013

Have You tried searching the forum ?

Just search for what is GUID and i guess You will get what You want.

Thanks.

Read only

Former Member
0 Likes
2,013

I already searched for GUID in the forum, but I only found a definition and that the function module creates GUIDs.

But how does guid_create works? What are the components of the GUID? I would like to rebuild one without using the function module.

Thanks.

Read only

2,013

Hi,

GUIDs can be generated in a number of ways; most often a hash of

several things that might be unique at any given point of time like the IP

address plus the clock date/time etc are used to generate Unique Ids.

Each system may have slightly different algorithm to generate the Unique

Id.

Check these links regarding GUIDs :

http://help.sap.com/saphelp_nw04/helpdata/en/b1/82309fd26611d4b2e90050dadfb92b/content.htm

http://help.sap.com/saphelp_nw2004s/helpdata/en/5e/a7914298c3c21ce10000000a1550b0/content.htm

Hope this helps.

Read only

Former Member
0 Likes
2,013

...and more specific?

Read only

0 Likes
2,013

Hi Martina,

I am also quite new to the function module. Tried my best to help You out.

Personally this i all i know about it for now.

Also GUIDs are either 22 or 32 character long .

Check this Wiki Link :

http://en.wikipedia.org/wiki/GUID#Algorithm This gives a rough idea atleast.

Hope this helps.

Read only

Former Member
0 Likes
2,013

Hi,

thank you for your help, but I need the specific construction.

Read only

matt
Active Contributor
0 Likes
2,013

1. Why do you need the algorithm?

2. Why can't you derive it from the source code - it doesn't use any system functions.

matt

Read only

0 Likes
2,013

1. I need to know how exclusive the GUID is. When I copy it to another system, can I be 100% sure it cannot exist yet. If this is build with use of a timestamp I can be sure it doesn't exist yet.

2. Yes it does. In SAP ECC 6.0:

* system call for 16 Byte GUID
CALL 'RFCControl'
    ID 'CODE' FIELD 'U'
    ID 'UUID' FIELD LV_G16X-X.

In SAP NetWeaver 7.1:

METHOD _CREATE_SYSTEMUUID_X16
  BY KERNEL MODULE pf_create_uuid16x16 ignore.
ENDMETHOD.

So how is the GUID (or UUID) build up?

Read only

0 Likes
2,013

I would be very interested in this question as well. We are migrating parts of our system and have to make sure none of the GUIDs already in use will be created by the new system in the future.

Read only

0 Likes
2,013

After a bit more research on this topic I found a SAP Javadoc [0] referencing an IETF Internet-Draft [1] defining the format of UUIDs. Paragraphs 3.2 to 3.4 of this document are describing algorithms to create UUIDs. (Edit: Superseded by RFC 4122 [2])

Apart from this I found a post [3] by Helge Deller in the linux-kernel mailing list archive stating that SAP Netweaver uses kernel functions for time-based creation of UUIDs. This would mean it should be safe to copy GUIDs from one system to another - at least if you are running your Netweaver(s) on a Linux machine.

However confirmation (or refutation) of this information would be really appreciated!

[0] http://help.sap.com/javadocs/NW04S/SPS09/km/com/sapportals/wcm/util/uuid/UUID.html

[1] http://www.opengroup.org/dce/info/draft-leach-uuids-guids-01.txt

[2] http://www.ietf.org/rfc/rfc4122.txt

[3] http://linux.derkeiler.com/Mailing-Lists/Kernel/2007-11/msg07138.html

Edited by: Tobias Koch on Dec 8, 2010 12:25 PM