Application Development and Automation 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: 
Read only

Problem with A017 table

Former Member
0 Likes
2,251

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.

9 REPLIES 9
Read only

Former Member
0 Likes
1,662

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.

Read only

Former Member
0 Likes
1,662

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

Read only

Former Member
0 Likes
1,662

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.

Read only

0 Likes
1,662

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.

Read only

0 Likes
1,662

Hi,

Ask your basis to increase the time. Your problem will get solved.

Regards,

Renjith Michael.

Read only

0 Likes
1,662

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.

Read only

0 Likes
1,662

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.

Read only

0 Likes
1,662

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

Read only

Former Member
0 Likes
1,662

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