‎2007 Oct 24 9:32 AM
Hi abapers,
Here iam facing an interesting situation in one of my object.am putting my words abt that object .
THANKS IN ADVANCE
i have more than 10,000 records in one internal table. i need to update that internal table with all the records. but i need to update in a frequency of 1000 records at a time...i.e., from that 10,000 records i need to update that itab in 10 loops. Please help me out.
Will give points.
‎2007 Oct 24 9:38 AM
hI,
It is very easy
Just use PACKAGE SIZE in your select query.
Do F1 on PACKAGE SIZE you will get details.
Regards,
Atish
‎2007 Oct 24 9:39 AM
Hi..
You can do this by declaring another Itab like ITab2 .
Eg:
DATA V_START TYPE I VALUE 1.
DATA V_END TYPE I VALUE 1000.
DO 10 TIMES .
APPEND LINES OF ITAB1 FROM V_START TO V_END TO ITAB2.
INSERT ZDBTABLE FROM TABLE ITAB2 ACCEPTING DUPLICATE KEYS.
V_START = V_END + 1.
V_END = V_END + 1000.
REFRESH ITAB2.
ENDDO.
<b>reward if Helpful.</b>
‎2007 Oct 24 10:43 AM
Hi Varma,
Thanx alot. really this hint worked in my case. am giving you points.
‎2007 Oct 24 9:39 AM
the most performant way is to use fieldsymbols.
having 10 points where the whole table is updated is bad programming style. You have to recode that. Loop over the table, then deliver the fieldsymbol to formroutines which are doing the changes, e.g:
DATA:
itab type standard table of t_something.
FIELD-SYMBOLS:
<p> type t_something.
loop at itab assigning <p>.
perform first_change using <p>,
perform second_change using <p>.
perform third_test using <p>.
....
endloop.
‎2007 Oct 24 9:41 AM
Hi Govardhan,
do like this
select <f1> <f2> from <dbtable> into table itab
package size 1000 where <clause>.
-
update records.
-
endselect.
Let me know if you are not clear.....
<b>Reward for helpful answers</b>
Satish
‎2007 Oct 24 9:42 AM
How should that work on an internal table? Please read postings more carefully.
‎2007 Oct 24 9:45 AM
Hi Rainer,
I am not telling about doing process after getting the data into internal table.. Before getting the data to the internal table...
Cheers,
Satish
‎2007 Oct 24 9:46 AM
‎2007 Oct 24 10:45 AM