10-06-2005 5:20 PM
HI,
When I am copying the entries from one table to another table and using modifying statement,
it is taking a lot of time during execution.
the number of entries in the first table are some 20,000 records
my logic is:
1)selecting the records from the first table into an internal table
2)loop and the modify the second table.
the performance is too slow.
is there any way where i can increase the performance.
Thanks
10-06-2005 5:31 PM
Hi
Are you using select - endslect. Modifying in Loop.
Why not use SELECT INTO TABLE ITAB.
( itab has structire of your first database table )
Populate entries from ITAB to ITAB1.
( Itab1 has structure of you second database table
For modify you can use
MODIFY <DBTAB> from TABLE ITAB1.
Cheers
10-06-2005 5:30 PM
10-06-2005 5:31 PM
Hi
Are you using select - endslect. Modifying in Loop.
Why not use SELECT INTO TABLE ITAB.
( itab has structire of your first database table )
Populate entries from ITAB to ITAB1.
( Itab1 has structure of you second database table
For modify you can use
MODIFY <DBTAB> from TABLE ITAB1.
Cheers
10-06-2005 5:42 PM
Hi Guys:
My code is like below:
1)select particular fields from ztable1 into table itab1.
2)loop at itab1
modify ztable2 from table itab1.
commitwork for sy-subrc = 0
endloop.
is there anything i have to change to make it fast?
10-06-2005 5:49 PM
10-06-2005 6:05 PM
Hi,
how about this.
giving modify after loop.
MODIFY TABLE itab [FROM wa] [TRANSPORTING f1 ... fn].
reward points for helpfull answers and close the thread if your question is solved.
regards,
venu.
10-06-2005 6:15 PM
Hi,
You are using "modify ztable2 from table itab1", then why is inside the loop. It means that you are modifying the entries n square times. Drop the loop..endloop.
If the modify line is of form "Modify ztable2 from itab1", then you might want to consider creating a modification table itab2 and modifying ztable2 in one shot.
Another suggestion is to move the commit work outside the loop if possible.
Raj
10-06-2005 6:48 PM
I am not sure why you are looping at the itab1 if it has the same structure as the database table ZTABLE2. All you need to do is
modify ZTABLE2 from table itab1.
Srinivas
10-06-2005 8:09 PM
Hi Guys,
Thanks for the answers. The problem is solved now. I did not use any loop.
I did award the points.
Thank You very much for all of those who participated in this thread.