‎2007 Aug 10 12:28 PM
hi all,
i am using a select statement extracting matnr werks from mseg table,
the table contains 3 crore records. and i want to update these records in to
data base table(ztable).
wen i run the program. for executing select statement its taking lot of time and after some time its saying timed out.
wat is the way i can update al the records in ztable.
thanks in advance
siva
‎2007 Aug 10 12:32 PM
Hi,
Instead of using one SELECT statement to READ all the data into an internal table.
What you can do is use
SELECT .......... PACKAGE SIZE 1000.
Push 1000 records on to Ztable
update your Ztable with the internal table data.
Clear the internal table.
ENDSELECT.
The performance will be bad, but since you just want to run this program once so that you copy the data onto the Ztable this should not be a problem.
Regards,
Sesh
‎2007 Aug 10 12:29 PM
‎2007 Aug 10 12:32 PM
Hi,
Instead of using one SELECT statement to READ all the data into an internal table.
What you can do is use
SELECT .......... PACKAGE SIZE 1000.
Push 1000 records on to Ztable
update your Ztable with the internal table data.
Clear the internal table.
ENDSELECT.
The performance will be bad, but since you just want to run this program once so that you copy the data onto the Ztable this should not be a problem.
Regards,
Sesh
‎2007 Aug 10 12:33 PM
SELECT EBELN " Purchasing Document Number
ERNAM " Name of Person who Created
" the Object
LIFNR " Vendor's account number
EKGRP " Purchasing group
BEDAT " Purchasing Document Date
FROM EKKO
PACKAGE SIZE 10000
APPENDING TABLE T_EBELN
WHERE EBELN IN S_EBELN
AND BEDAT IN S_BEDAT.
ENDSELECT.
Write the code similar to the above SELECT QUERY.... this helps you.......
Regards,
Pavan
‎2007 Aug 10 12:48 PM
Hi..
Use the code below and run the program in background incase of probelm in Foreground.
DATA : ITAB TYPE TABLE OF ZTABLE.
SELECT MATNR WERKS
FROM MSEG
INTO TABLE ITAB
PACKAGE SIZE 10000.
INSERT ZTABLE FROM TABLE ITAB ACCEPTING DUPLICATE KEYS.
<b>Reward if Helpful.</b>