Skip to Content
avatar image
Former Member

select single

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 10, 2008 at 07:13 AM

    Hi padmini,

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

    Regards,

    Sravanthi

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 10, 2008 at 07:02 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • avatar image
    Former Member
    Sep 10, 2008 at 07:01 AM

    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

    Add comment
    10|10000 characters needed characters exceeded