Skip to Content
0
Former Member
Nov 20, 2010 at 11:29 AM

time issue of select statement

36 Views

Hi friends,

I have a doubt about select single statement in this particular statement below.

i have the code which goes this way.

loop at itab.

concatenate *year *materail no * item type into dummy variable.

select single dmbtr from bsis into itab-dmbtr where xref3 = dummy variable and belnr = itab-migodoc and gjahr = itab-mjahr and hkont = '0000123'.

clear dummy variable.

modify itab.

endloop.

the bsis table has around 4,000,000 records.

The report when executed goes smoothly till the point where the above select statement is encountered.

my question is does it take time to execute because of so many records ?

If not then why dies it take a lot of time to execute a single select statement ?

and how can i optimise the time consumed by this select query or report. ?

Thank you.

Moderator message: please understand the basic concept of using primary or secondary indexes in your queries, you will sure find the missing field in your where-clause, read the sticky threads of this forum.

Edited by: Thomas Zloch on Nov 20, 2010 5:31 PM