10-03-2008 1:16 PM
Hi,
Is there any Function Module to generate Random Numbers automatically.
Say for example: The Lower Limit is 10 and the Higher imit is 30.
So is should generete the random numbers between 10 and 30. and it should store in he Data Base level.
Please help me in this ascept.
Thanks & Regards:
JSR
10-03-2008 1:20 PM
Hello
You may try class CL_ABAP_RANDOM if it is available on your system.
Alternatives:
CL_ABAP_RANDOM_INT
GENERAL_GET_RANDOM_INT (fm)
Regards
Uwe
10-03-2008 1:20 PM
Hello
You may try class CL_ABAP_RANDOM if it is available on your system.
Alternatives:
CL_ABAP_RANDOM_INT
GENERAL_GET_RANDOM_INT (fm)
Regards
Uwe
10-03-2008 1:22 PM
Hi,
You can use Number Range Concept.
Get new number
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
nr_range_nr = c_01
object = c_key_no
IMPORTING
number = pw_key_no
EXCEPTIONS
interval_not_found = 1
number_range_not_intern = 2
object_not_found = 3
quantity_is_0 = 4
quantity_is_not_1 = 5
interval_overflow = 6
buffer_overflow = 7
OTHERS = 8.
Thanks,
Sree.
10-03-2008 1:23 PM
>
> Hi,
> You can use Number Range Concept.
>
> ** Get new number
> * CALL FUNCTION 'NUMBER_GET_NEXT'
> * EXPORTING
> * nr_range_nr = c_01
> * object = c_key_no
> * IMPORTING
> * number = pw_key_no
> * EXCEPTIONS
> * interval_not_found = 1
> * number_range_not_intern = 2
> * object_not_found = 3
> * quantity_is_0 = 4
> * quantity_is_not_1 = 5
> * interval_overflow = 6
> * buffer_overflow = 7
> * OTHERS = 8.
>
> Thanks,
> Sree.
That's NOT a randomizer.
10-03-2008 3:32 PM
You could combine it with buffering the number range object to... lets say... 582438317 records and then randomly restart the server all the time...
10-03-2008 1:26 PM
10-03-2008 1:29 PM