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

function to create id

Former Member
0 Likes
1,256

is there any existing functionmodule which can be used for unique id generation.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,067

Hi,

GENERAL_GET_RANDOM_INT generates random numbers between 0 and the given value.

Regards,

Vidya

7 REPLIES 7
Read only

Former Member
0 Likes
1,068

Hi,

GENERAL_GET_RANDOM_INT generates random numbers between 0 and the given value.

Regards,

Vidya

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,067

What is meant by unique id? Do you mean a random number?

Regards,

Rich Heilman

Read only

uwe_schieferstein
Active Contributor
0 Likes
1,067

Hello William

I use the static method CL_RECA_GUID=>GET_NEW_GUID to create unique IDs.

Regards

Uwe

Read only

Former Member
0 Likes
1,067

Hi William,

The Function module <b>LIS_INT_RANDOM_NUMBER</b> will generate random numbers.

The function module <b>QF05_RANDOM_INTEGER</b> will generate random between specified max and min integers.

Thanks,

Vinay

Message was edited by: Vinaykumar G

Read only

Former Member
0 Likes
1,067

U can define a number range and use the fm get_next_number

Read only

Former Member
0 Likes
1,067

You can use the functions:

RANDOM_AMOUNT

RANDOM_C

RANDOM_C_BY_SET

RANDOM_F8

RANDOM_I2

RANDOM_I4

RANDOM_INITIALIZE

RANDOM_P

RANDOM_TABLE_ENTRY

Regards,

ravi

Read only

Former Member
0 Likes
1,067

Hi,

Use GUID_CREATE.

Regards,

Raghav