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

Unique id

Former Member
0 Likes
3,594

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,950

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

4 REPLIES 4
Read only

Former Member
0 Likes
1,951

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

Read only

Former Member
0 Likes
1,950

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.

Read only

0 Likes
1,950

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.

Read only

saranwin
Contributor
0 Likes
1,950

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