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

random number

Former Member
0 Likes
858

hi,

I have to generate alpha numeric random numbers,

Is there any functional module or bapi.

6 REPLIES 6
Read only

Former Member
0 Likes
803

Hello Anikesh,

<i>Functions RANDOM_C and RANDOM_I4 will return a random number. If you need a unique string (for example, to use in a table key), <b>use the function GUID_CREATE.</b></i>

using GUID_CREATE will solve your problem....

Reward if helpful and pls revert if it solves the problem

Regards

Byju

Read only

JozsefSzikszai
Active Contributor
0 Likes
803

hi anikesh,

check the FMs in function group F052. If you want to create a random number you have to call RANDOM_INITIALIZE first.

On the other hand what is the business scenario, where you need a random number? Or do you develope a game in ABAP?

regards

ec

Read only

0 Likes
803

hi,

The scenario is as follows.

I am working for edi, actually we generate 10 digit PO number, but the client who receive my edi has only 7 digits PO number.

So i have to convert my 10 digit PO No into digit 6 digit alpha Numeric PO Number and send to the client

so i have to use FM in user exit.

can u pls guide me on this.

Read only

0 Likes
803

you don't need a random number for that, business cannot be based on random numbers...

Read only

0 Likes
803

but, again, anything can happen in Bangalore...

Read only

0 Likes
803

but this i my requirement,

what can be done, how shall we proceed.

no i have to generate alphanumeric random numbers ( 6 digit)