Application Development 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: 

select single

Former Member
0 Kudos

hello,

pls help me with the following query.

i am using Select single statement

to Identify HH order # and check for duplicates in SAP

SELECT SINGLE VBELN " Sales document

FROM VBAK

INTO (G_SAP_ORDER)

WHERE BSTDK EQ g_del_DATE "Customer PO date

and IHREZ EQ G_SO_NUMBER. "Reference number

but here, the where condition are not key fields of the table vbak . i want to select vbeln from vbak which is the primary key of this table based on conditions also....

this statement gives me performance error :

Table &V1&: No field of a table index in the WHERE condition

&V1& = Table name

The current SELECT statement cannot be processed using an index since the WHERE condition does not contain any field of a table index (or index fields only with the addition NOT or the relational operators NE or ' <>').

Due to this, you can have long response times when accessing large database tables.

Check whether you can formulate the WHERE condition to suit a table index.

Check whether an additional table index needs to be created.

How can i accomplish this?

Edited by: padmini udayakumar on Sep 10, 2008 8:55 AM

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi padmini,

[Select single|http://web.mit.edu/fss/dev/select_examples.htm]

Regards,

Sravanthi

5 REPLIES 5

Former Member
0 Kudos

Hi,

The following message just informs you that the fields in your where conditions are not indexes ( primary or secondary ).

Due to this performance will be hampered. If you need to remove this error you need to make the BSTDK and IHREZ as secondary indexes.

To do this you need to go to your VBAK table and you will find indexes tab there. Press the tab and continue with index creation.

Regards,

Pramod

Former Member
0 Kudos

Hi,

you can do it two ways.

either create a table index or modify ur search criteria i.e in where condition put any key field of table vbak.

Thanks

Rajesh Kumar

0 Kudos

Hi,

Since this is VBAK table and VBELN is your only key field and since you are selecting VBELN only it will not be possible for you to enter any key field you NEED to create a secondary index.

But please make sure creating of secondary index speeds up selection process but slows the process of writing into DB table.

Regards,

Pramod

Former Member
0 Kudos

Hi padmini,

[Select single|http://web.mit.edu/fss/dev/select_examples.htm]

Regards,

Sravanthi

0 Kudos

Hi sravanthi,

thanks a lot,,,

ur reply is very useful...

thank u very much for this help..