‎2008 Sep 15 1:15 PM
Hi friends,
i have a small dought regarding Unique id.
what exactly unique id means.
i found a function module
SYSTEM_UUID_C_CREATE
which creates a unique id worldwide.
can any body tell me what exactly this unique id means and what is the use of it with a example.
Regards,
PRIYANKA.
‎2008 Sep 15 1:25 PM
Hello Priyanka
Unique means that regardless how many ID's you generate you will never get a duplicate ID.
There also is another function module you can use to achieve this. It provides ID's of different length:
GUID_CREATE
You usually use this function to generate ID's when you have to make sure that there won't be any duplicates.
Hope that helps,
Michael
‎2008 Sep 15 1:25 PM
Hello Priyanka
Unique means that regardless how many ID's you generate you will never get a duplicate ID.
There also is another function module you can use to achieve this. It provides ID's of different length:
GUID_CREATE
You usually use this function to generate ID's when you have to make sure that there won't be any duplicates.
Hope that helps,
Michael
‎2008 Sep 15 1:26 PM
Hi priyanka,
This is what i get in Google search
We sometimes face situations where we need an ID for uniquely identifying our objects. SAP had provided a function module for the same. We can use the function module SYSTEM_UUID_C_CREATE for generating a world wide unique ID. (Yes, this is a worldwide unique ID. No other person can get the same ID even if two people execute the same function module, at the same time.)
Here is the sample code for the same.
REPORT ZGUID .
data: unique_id like sys_uid.
start-of-selection.
clear unique_id.
CALL FUNCTION 'SYSTEM_UUID_C_CREATE'
IMPORTING
UUID = unique_id.
write : unique_id.
‎2008 Sep 15 1:30 PM
kartik before posting the question in sdn I have done the same thing what you did.
Instead i even searched the sdn form but could not find a clear answer.
Regards,
PRIYANKA.
‎2008 Sep 15 1:29 PM
Hi,
Unique ID is nothing but no duplication in the serious like : 1 2 3 4 5 6 ....n. There should not be any repetation in the value what your entering or automatic generation.
In your case that function module will create the value automatically i mean if you have the value 4 in table function module will create 5(It will compare the previous value and create the next value). If any duplication occurs in the unique 'Error will through at the time updating in table'.
Regards,
Saran