‎2008 Apr 15 11:32 AM
Hello,
i must be update a customer table with 3million entry.
how can i get performant the entries and update one field?
I thought i create a select and use the "open cursor" command.
and i update the selected entries and then i get the next entries.
Can anyone give me some tips...thanks
‎2008 Apr 16 7:56 AM
You can't download 3.000.000 entries! These recommendations are ....
You should not use the modify db-table, that the is the only command which works not with arrays.
What do you want to do?
The fastest command is
Updata dbtab set field1 = a
where ....
you can also write field1 = field1 + a or + field10
If this enough then use it.
Otherwise you must download in package of about 10.000 and update.
Siegfried
‎2008 Apr 15 11:43 AM
Hi
get all the data from the table and move it a ITAB
then use modify to change the field
If the field is not primary key then use MODIFY TABLE or UPDATE TABLE to update table otherwise delete the table entries and use INSERT TABLE
Regards
Shiva
‎2008 Apr 15 11:55 AM
Hi Shiva,
can i get all 3.000.000 Entries from DB?!? and is it then performant?
‎2008 Apr 15 12:00 PM
Hi
Schedlue it in backgroound
first do it for some 10 records by using up to 20 rows
if it works then remove it and schedlue a background job
Try like this
Regards
Shiva
‎2008 Apr 15 12:03 PM
ok.
what do you think about this...
SELECT xxxx xxxx
FROM dbtab
APPENDING TABLE gt_itab
PACKAGE SIZE 20000
WHERE lfdnr IN so_lfdnr.
modify ......
update db....
refresh gt_itab.
ENDSELECT.
‎2008 Apr 15 12:06 PM
SELECT xxxx xxxx
into TABLE gt_itab
FROM dbtab.
loop at gt_itab.
modify.
endloop.
‎2008 Apr 16 12:27 AM
Hi DDC,
You can improve your LOOP run choosing an FIELD-SYMBOL:
FIELD-SYMBOLS: <fs_itab> LIKE "structure of gt_itab".
SELECT xxxx xxxx INTO TABLE gt_itab FROM dbtab.
LOOP AT gt_itab assigning <fs_itab>.
....
<fs_itab>-field = 'abcd'.
....
ENDLOOP.
In this case there is no MODIFY needed at all. This is a proven method for saving system time. Hint: The internal table should be declared WITHOUT headerline; i.e. data: gt_itab like table of "structure".!
Try it,
Heinz
‎2008 Apr 16 7:56 AM
You can't download 3.000.000 entries! These recommendations are ....
You should not use the modify db-table, that the is the only command which works not with arrays.
What do you want to do?
The fastest command is
Updata dbtab set field1 = a
where ....
you can also write field1 = field1 + a or + field10
If this enough then use it.
Otherwise you must download in package of about 10.000 and update.
Siegfried
‎2008 Apr 16 9:18 AM
now i select all entries and use this command:
Updata dbtab set field1 = a
where ....
it doesn´t takes a long time. It was very fast....
thanks a lot