Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Table

Former Member
0 Likes
746

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?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
676

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.

4 REPLIES 4
Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
676

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

Read only

Former Member
0 Likes
676

Hi,

Try with TCode

OY19 - Compare Tables

Regards,

anirban

Read only

kiran_k8
Active Contributor
0 Likes
676

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.

Read only

Former Member
0 Likes
677

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.