Skip to Content

DFKKOP Select is slow

Hi. I am having troubles trying to SELECT data from the table DFKKOP. The thing is I only have the field XBLNR for the WHERE filter and it is not a key field. My SELECT is as follows:

if t_data_folder[] is not initial.

SELECT opbel opupw opupk xblnr bukrs

FROM dfkkop

INTO TABLE t_dfkkop

FOR ALL ENTRIES IN t_data_folder

WHERE xblnr = t_data_folder-xblnr.

ENDIF.

The data table t_data_folder is filled with data from a .CSV file from excel. It has around 150 entries and this SELECT is needing about 10 minutes to execute.

Can anybody show me a way to improve the performance?

Thanks,

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Dec 10, 2015 at 03:24 PM

    Hello,

    Try adding DFKKKO to the select. Use xblnr in DFKKKO to get opbel and then use opbel to get the items in DFKKOP.

    K--

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 10, 2015 at 03:35 PM

    Put an Index on field XBLNR of table DFKKOP

    Transaction SE11 -> Database Table

    menu: GoTo->Indexes -> Create-Button (white sheet) // Indexname should start with "Z"

    Chose: Non-unique index and index on all database systems and add the field by using the button "Table Fields"

    Create the index into the development system and transport to productiv system.

    But take care do not Transport the index to productive while other users are working. It could create a dump.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.