cancel
Showing results for 
Search instead for 
Did you mean: 

Generating Random number for requisition number

Former Member
0 Kudos

hai all,

Am having a requirement of generating a random number based on the type of Process.

Say if it is medical means I want it to be MEDxxxxx .

Is thr any FM Please send some suggestions...

Thanks in advance,

Nalla.B

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Create one FM and pass the Type "MED" or othere you want and use below FM to get the random number and append the passed type with returned random number. Finally return the appended number from your FM.

CALL FUNCTION 'QF05_RANDOM_INTEGER'

EXPORTING

ran_int_max = 1000

ran_int_min = 1

IMPORTING

ran_int = w_num

EXCEPTIONS

invalid_input = 1

OTHERS = 2.

Hope this will help!

Thanks!

Piyush

Answers (1)

Answers (1)

siddharthrajora
Product and Topic Expert
Product and Topic Expert
0 Kudos

which process?

Every random number specific to application can be triggerd, you can find the badi or teh steps in that specific application

checlk SNR0

Former Member
0 Kudos

hi Siddharth,

Am New to WDY Abap,

can u pls explain me how to use the transaction to get the numbers????

I have checked that its displaying list of object. how can i use that to generate the num???

Thanks in Advance,

Nalla.B

siddharthrajora
Product and Topic Expert
Product and Topic Expert
0 Kudos

which application you are trying to generate random numbers?

Former Member
0 Kudos

Hai,

Am rite nw working on medical applications.

I want to generate a random number for the requisition number for the submission of a set of bills under a unique indentification as requisition number.

PLs give some suggestions,

Thanks in Advance,

Nalla.B

Lukas_Weigelt
Active Contributor
0 Kudos

Hi,

it sounds to me like the "random" number should be unique... I would advise you to use a number range for this.

Help-Link:

http://help.sap.com/saphelp_nw04/helpdata/en/1f/8310df4bc511d189750000e8322d00/content.htm

regards, Lukas