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

select statement

Former Member
0 Likes
430

hi,

if we hav 10000 records in a list.suppose we want to retrieve 6 records .,without using where clause in select statement. and also that records r stored in random places...how to retrieve without where clause.

thanx.

vijay

3 REPLIES 3
Read only

Former Member
0 Likes
410

Hi,

You can <b>create view with condition</b> so that you have got all 6 record exactly.

Reg,

Hariharan Natarajan.

Read only

Former Member
0 Likes
410

Hai Vijay,

If that Database table is having indxes,You can use them.

Indexes are not specified in the where clause.

Hers is sample code using indexes.Here index is on first column of Database table.

Have a look at this.

DATA:

xcarrid LIKE SPFLI-carrid,

xconnid LIKE SPFLI-connid,

xcityfrom LIKE SPFLI-cityfrom.

SELECT carrid connid cityfrom

FROM spfli

INTO (xcarrid, xconnid, xcityfrom)

WHERE carrid = 'LH ' AND cityfrom = 'FRANKFURT'

<b> %_HINTS ORACLE 'INDEX("SPFLI" "SPFLI~001")'</b>

.

WRITE: / xcarrid, xconnid, xcityfrom.

ENDSELECT.

This type of selection improves the performance a lot when the records are very high.

Hope this helps you.

<b>Reward points if it helps you.</b>

Regds,

Rama chary.Pammi

Read only

Sathish
Product and Topic Expert
Product and Topic Expert
0 Likes
410

You can try with view maintenance...

the attached link has few suggestions which can be used..

https://wiki.sdn.sap.com/wiki/display/ABAP/ABAP+Performance