09-10-2008 7:54 AM
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
09-10-2008 8:13 AM
Hi padmini,
[Select single|http://web.mit.edu/fss/dev/select_examples.htm]
Regards,
Sravanthi
09-10-2008 8: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
09-10-2008 8: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
09-10-2008 8:08 AM
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
09-10-2008 8:13 AM
Hi padmini,
[Select single|http://web.mit.edu/fss/dev/select_examples.htm]
Regards,
Sravanthi
09-10-2008 9:11 AM
Hi sravanthi,
thanks a lot,,,
ur reply is very useful...
thank u very much for this help..