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

Performance issue - Select statement

Former Member
0 Likes
870

Hi I am having the 10 lack records in the KONP table . If i am trying to see all the records in SE11 , it is giving the short dump TSV_TNEW_PAGE_ALLOC_FAILED . I know this is because of less memory in the Server . Is there any other way to get the data ? How to optimise the below SELECT statement if i have large data in the table .

i_condn_data - is having 8 lack records .

SELECT knumh kznep valtg valdt zterm

FROM konp

INTO TABLE i_condn_data_b

FOR ALL ENTRIES IN i_condn_data

WHERE knumh = i_condn_data-knumh

AND kschl = p_kschl.

Please suggest .

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
823

Hi,

Try to use all Primary keys from KONP in the WHERE condition of the Select statment. that will be only solution

Regards

Sudheer

6 REPLIES 6
Read only

Former Member
0 Likes
824

Hi,

Try to use all Primary keys from KONP in the WHERE condition of the Select statment. that will be only solution

Regards

Sudheer

Read only

Former Member
0 Likes
823

Hi,

You can make use of the PACKAGE SIZE addition for the SELECT statements.

This will read data from table in sets rather than the whole table.

Regards,

Sumant.

Read only

Former Member
0 Likes
823

Hi..

if u want all the data..

divide the table <b>i_condn_data into 4 internal tables with 2 lakh records</b>.

write select query four times with these 4 itabs..which will avoid short dump..

Read only

Former Member
0 Likes
823

hi,

As said above ... Include all the primary key fields in your select statement in where condition and try to divide the data in to multiple internal tables ...

regards,

Santosh

Read only

Former Member
0 Likes
823

Hi,

try to use "UP TO n ROWS" to control the quantity of selected data in each Loop step.

Something like this:

sort itab by itab-knumh.

flag = 'X'.

while flag = 'X'.

SELECT knumh kznep valtg valdt zterm

FROM konp

INTO TABLE i_condn_data_b UP TO one_million ROWS

WHERE knumh > new_value_for_selection

AND kschl = p_kschl.

describe table i_condn_data_b lines i.

read table i_condn_data_b index i.

new_value_for_selection = i_condn_data_b-knumh.

*....your logic for table i_condn_data_b

if one_million > i.

clear flag.

endif.

endwhile.

Regards

Read only

Former Member
0 Likes
823

Hi

chk for duplicate entries in i_condn_data comparing knumh.

try to split your select or use package size option in ur select.

regards,

madhu