‎2008 Jul 18 7:00 AM
Hi
I hv a Ztable haing 15 million records and now the situation has come to compare the all these records.
1.The problem is here how the 15 millions record would be kept in buffers,if I am use select * into table <> ?
2. Another alternate, I used select - endselect. somewht it works even taking around more than 20 mins to compare the record by using the secondary index. But the problem is it keeps some records like it netarea is the mandatory field , for 1 there should 100 records bt it shows only 67 like this.
3. table *<table> is obsolete and while syntax check it shows an error. ?
I would appreciate with reward points if any one help me
1. how the processing time can reduce?
2. How the Table can be called directly as Tables *<>?
3. during select - endselect why it keeps some records?
‎2008 Jul 18 7:09 AM
Use cursors, same code given below.
OPEN CURSOR c1 FOR
select *
from z-table
DO.
FETCH NEXT CURSOR c1 INTO TABLE it_table PACKAGE SIZE 20000.
IF sy-subrc <> 0.
CLOSE CURSOR c1.
EXIT.
ENDIF.
do sort and then comparision..............required functionality
REFRESH: it_table.
ENDDO.
‎2008 Jul 18 7:03 AM
Hi,
As you need to process almost 15 million records.
Cam you try with the CURSOR approach , only processings ay 50K or 100K records at one time..
Something like :
Open cursor g_cursor ...
fetch next cursor...
process internal table..
close cursor...
Hope this helps...
Regards,
Sandeep
‎2008 Jul 18 7:05 AM
‎2008 Jul 18 7:06 AM
Jha,
Compare with what?Comparing the all the records with each other in the same table?
SCMP-Comparision of tables across Clients
SCU0-Comparing configuration
K.Kiran.
‎2008 Jul 18 7:09 AM
Use cursors, same code given below.
OPEN CURSOR c1 FOR
select *
from z-table
DO.
FETCH NEXT CURSOR c1 INTO TABLE it_table PACKAGE SIZE 20000.
IF sy-subrc <> 0.
CLOSE CURSOR c1.
EXIT.
ENDIF.
do sort and then comparision..............required functionality
REFRESH: it_table.
ENDDO.