2015 Dec 10 3:00 PM
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,
2015 Dec 10 3: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--
2015 Dec 10 3: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--
2015 Dec 12 4:41 PM
2015 Dec 10 3: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.
2015 Dec 12 4:49 PM
thank you for the answer, but I fixed it by adding dfkkko to the select and acceding then by opbel to dfkkop. This way I don't have to make any changes in the table