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

Full table scan

Former Member
0 Likes
496

Hi,

The following statement is going for full table scan.

SELECT MANDT MOLGA TRFGB TGBTX

from t510g

INTO TABLE it_payareatxt.

Kindly suggest any modifications can we do to this statement to avoid full table scan.

3 REPLIES 3
Read only

h_senden2
Active Contributor
0 Likes
425

add a WHERE clause with fields that use an index

regards

Hans

Read only

Former Member
0 Likes
425

Hi,

SELECT <Field-names>

FROM <table-name>

INTO TABLE <tab-name>

WHERE <Condition>

Thanks

NItesh

Read only

Former Member
0 Likes
425

Example of a single scan:

DATA wa        TYPE sflight. 
DATA seatsfree TYPE I. 

SELECT SINGLE * FROM sflight INTO wa 
       WHERE 
         carrid   = 'LH '      AND 
         connid   = '0400'     AND 
         fldate   = '20010228'. 
         FLDATE   = '19950228'. 
seatsfree = wa-seatsmax - wa-seatsocc. 

WRITE: / wa-carrid, wa-connid, wa-fldate, seatsfree.

Regards,

Ali