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 command on dfkkop

Former Member
0 Kudos

Hi Forum,

I've just started learning ABAP and thankfull for any help.

When do a selection over the DFKKOP Table by using one of its Indizes (AUGST, VKONT, BUKRS and AUGDT) it still takes 2 Minutes to get results when testing in a real-data-environment.

CODE

select * from dfkkop into table tab_dfkkop

where augst ne 9

and vkont = p_vkont

and bukrs = p_bukrs

and augdt <= sy-datum.

ENDCODE

What can I do to get my code more efficient?

Thanks a lot for your help in advance,

best regards,

beckersk

1 ACCEPTED SOLUTION

Former Member
0 Kudos

The augst ne 9 is probably causing the problem. Change this to augst eq space and see what happens.

Rob

7 REPLIES 7

former_member192616
Active Contributor
0 Kudos

Hi,

please post your execution plan and table and index statistics.

Runtime figures from ST05 (number of records selected, time, ...) would be interesting as well.

Kind regards,

Hermann

Former Member
0 Kudos

Hi Hermann,

thanks a lot for your fast help.

What do you mean with "execution plan and table and index statistics"?

Best regards,

beckersk

0 Kudos

Hi,

> What do you mean with "execution plan and table and index statistics"?

all the content you get when you click on "explain" for the statement in the SQL trace.

Here is a little description how and where to get an execution plan generally:

/people/hermann.gahm/blog/2010/03/04/explaining-the-explain-plan

Kind regards,

Hermann

0 Kudos

>

> What do you mean with "execution plan and table and index statistics"?

Moderator message - Welcome to SCN. Unfortunately, this forum is not a place to learn ABAP. I suggest that you get one of the good ABAP books that are out there and maybe join an internet forum that caters to beginners Also please read and before posting Rob

Former Member
0 Kudos

The augst ne 9 is probably causing the problem. Change this to augst eq space and see what happens.

Rob

0 Kudos

Hi Rob,

> "The augst ne 9 is probably causing the problem. Change this to augst eq space and see what happens."

says the experienced developer with application knowledge.

I like those situations where try to apply pure "dumb" technical analysis and methods and then an experienced

developer with application knowledge says something like you did. Often enough they know quick and efficient

changes (e.g. seleting other tables, not selecting tables at all, ...) that are just not "visible" for us technology guys

Kind regards,

Hermann

Former Member
0 Kudos

Hey Rob,

thanks a lot - your "space-tip" worked perfectly. Now the selection needs only 1 -1 2 secs.

Thanks both of you for your help. If I might have posted in a wrong manner or way, I'm sorry and I'll try to obey the rules the next time.

Cheers,

beckersk