‎2005 Nov 24 9:15 AM
Does anyone have a program to fill in a db table randomly ?
regards,
‎2005 Nov 24 9:18 AM
Can you elaborate your requirment little more?
what type of data you want to insert randomly? what is the source of the data?
‎2005 Nov 24 9:21 AM
I have created my own db table.
want to fill it in with random entries random fields random values ... just to be able to do some testst
‎2005 Nov 24 9:41 AM
Stephan,
Create the Database Table in SE11.
Insert values into this Databse Table through follwoing ways:
Way : 1: Through ABAP Program.
a. Create an Internal Table of Type DataBase Table.
b. Fill the Internal Table with the Randam Values for the fields.
c. Insert Values into the Databse Table
Eg Command: INSERT DBTABLE FROM TABLE itab.
Way: 2: Through Table Maintenance Generator.
a. SE54.
b. SM30.
Thanks
Kam
Message was edited by: Kam
‎2005 Nov 24 9:23 AM
Thse Function Modules are useed to generate random values
RANDOM_AMOUNT
RANDOM_C
RANDOM_C_BY_SET
RANDOM_F8
RANDOM_I2
RANDOM_I4
RANDOM_INITIALIZE
RANDOM_P
RANDOM_TABLE_ENTRY
I Think the FM RANDOM_TABLE_ENTRY is the one which suits your requirement.
see if they are useful
Regards,
ravi
‎2005 Nov 24 9:34 AM
> Thse Function Modules are useed to generate random
> values
> RANDOM_AMOUNT
> RANDOM_C
> RANDOM_C_BY_SET
> RANDOM_F8
> RANDOM_I2
> RANDOM_I4
> RANDOM_INITIALIZE
> RANDOM_P
> RANDOM_TABLE_ENTRY
>
>
> I Think the FM RANDOM_TABLE_ENTRY is the one which
> suits your requirement.
> see if they are useful
> Regards,
> ravi
Hi Ravi,
thanks but none of these fm fits. I was thinking to an home made program
Regards,
‎2005 Nov 24 9:55 AM
Hi Stephan,
try this skeleton code
data: random_value type i.
start-of-selection.
do 100 times. "for inserting 100 records
clear random_value.
This FM generates an random integer between rnd_min
and rnd_max
If you want character random values,use random_c
If you want amount random values,use random_amount
call function 'RANDOM_I4'
exporting
RND_MIN = 1
RND_Max = 100
importing
rnd_value = random_value.
it_ztable-field1 = random_value.
append it_ztable.
clear it_ztable.
enddo.
modify ztable from it_ztable.
Regards,
Ravi Kanth