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

screen painter

Former Member
0 Likes
692

Hello experts,

Here i have a doubt,in program i have to generate an account number of a bank customer randomly and it should be unique for every customer... so could you tell me how to make it....

thanking you

Vamsi

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
659

Hi,

QF05_RANDOM Random number generator

QF05_RANDOM_INTEGER Random (whole) number

Above FM`s can be used.

Best regards,

Prashant

5 REPLIES 5
Read only

Former Member
0 Likes
659

You can use the FM QF05_RANDOM to generate a random number

Read only

Former Member
0 Likes
660

Hi,

QF05_RANDOM Random number generator

QF05_RANDOM_INTEGER Random (whole) number

Above FM`s can be used.

Best regards,

Prashant

Read only

Former Member
0 Likes
659

The code can be like this :

L_RAN_NUMBER LIKE QF00-RAN_NUMBER.

CALL FUNCTION 'QF05_RANDOM'

IMPORTING

RAN_NUMBER = L_RAN_NUMBER.

Read only

0 Likes
659

thanks for giving answer,almost my problem is solved ,but it won't generate unique numbers, what can i do.

Read only

Former Member
0 Likes
659

Hi Vamsi,

In that case, what you can do is Create a Ztable and store the number in it. Every time you can refer the table and increment it by 1 and then update the Ztable.

Best regards,

Prashant