‎2008 Jan 28 11:01 AM
Hi Experts,
I am retriving the data form A017 table, My problem is when we are using more than 5000 entriess in the internal table(For all entries), then we are getting the dump "Time out ereror",
How to improve the prformance to this querry.
My querry is :
SELECT knumh datbi datab matnr lifnr ekorg werks
FROM a017
INTO table y_i_a017
FOR ALL ENTRIES IN y_i_filedata
WHERE lifnr EQ y_i_filedata-lifnr AND
matnr EQ y_i_filedata-matnr AND
ekorg EQ y_i_filedata-ekorg AND
werks EQ y_i_filedata-werks.
Thanks in advance.
Regards,
Sundya.
‎2008 Jan 28 11:07 AM
Hi,
Have you checked whether the itab y_i_filedata is not initial
do the select only if the itab y_i_filedata is not initial.
Then for improving performance use all the key fields. If it still gives error, contact your basis team to increase the time.
Regards,
Renjith Michael.
‎2008 Jan 28 2:54 PM
You are not using the index, so that is the main drag on pewrformance. You should be able to speed it up a bit by eliminating duplicates from the table (comparing the fields you are SELECTing on) before doing the SELECT.
Rob
‎2008 Jan 28 3:43 PM
Hello:
You might want to consider installing some sort of error handling. For instance...
if y_i_filedata is initial.
message exxx with 'No data in y_i_filedata.
else.
SELECT knumh datbi datab matnr lifnr ekorg werks
FROM a017 INTO table y_i_a017
FOR ALL ENTRIES IN y_i_filedata
WHERE lifnr EQ y_i_filedata-lifnr AND
matnr EQ y_i_filedata-matnr AND
ekorg EQ y_i_filedata-ekorg AND
werks EQ y_i_filedata-werks.
endif.
‎2008 Jan 29 4:57 AM
hello John,
Thanks for your response.
Already i have data more than 5000 records, whenever if the file is having more than 5000 rec's i am getting time out error.
Other wise my code is working fine.
Thanks and Regards,
Sandya.
‎2008 Jan 29 5:03 AM
Hi,
Ask your basis to increase the time. Your problem will get solved.
Regards,
Renjith Michael.
‎2008 Jan 29 5:09 AM
Hi Renjith Michael,
Thanks for your response.
Increasing the time is not possible. Because, we are getting the problem only with this query. Remainig all are working fine.
Thanks and Ragards,
Sandya.
‎2008 Jan 29 5:17 AM
Hi,
The performance will be increase much if you can provide KAPPL, and KSCHL also in the select query.
b'coz it will take all the entries which are there without these keys also unnecessarly making the perfomance low. So it will be nice if u can provide those too.
Regards,
Renjith Michael.
‎2008 Jan 29 3:04 PM
If you cannot add index fields to the query (and the internal table y_i_filedata has entries), you'll have to run it in the background.
Rob
‎2008 Feb 18 12:53 PM
Hi Sandya,
Your SELECT statement does not use all the key fields like KAPPL, KSCHL.
KAPPL can have values like 'M', 'V' etc. KSCHL can have values like 'PB00', VKP0 etc.
Once those are used, the query could be be faster.
Reward points if found helpful.
Thanks,
Balaji