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

Select... endselect VS Select into an internal table

Former Member
0 Likes
1,726

hi all,

which is the best alternative performance,

Select directly into an internal table or Select... endselect command.

thanks

Moderator message - Please do not ask or answer basic questions like this. Search the forum instead. Post locked

Edited by: Rob Burbank on Apr 23, 2009 11:13 AM

5 REPLIES 5
Read only

Former Member
0 Likes
892

Hi,

Select into internal table is better perofrmance query. Because Select...End select working as loop statement.

Read only

former_member156446
Active Contributor
0 Likes
892

select... endselect is also called as select loop.

so definitely select into internal table is better when you compare both.

Read only

Former Member
0 Likes
892

Select into internal table is better, because the Database Cursor is opened only once in the DB.

Whenever you have performance comparison doubts u can do this.

go to SE30.

Click on Tips and tricks.

Write your code in both windows and click on measrure run time.

YOu will see which is faster.

Regards,

Ravi

Read only

Former Member
0 Likes
892

Select into internal table is better, because the Database Cursor is opened only once in the DB.

Whenever you have performance comparison doubts u can do this.

go to SE30.

Click on Tips and tricks.

Write your code in both windows and click on measrure run time.

YOu will see which is faster.

In FAct you have a ready made example.

go to SE30.

Click on Tips and tricks.

On the left hand side pane, under

ABAP Objects Performance example->SQL Interface->Array Operations->SElect....into Table

docuble click on that and click on measure runtime.

(I got 331 microseconds for select-endselect over 47 micro seconds in select into table.

Regards,

Ravi

Read only

faisalatsap
Active Contributor
0 Likes
892

Hi,

I am also agree with all that Select into internal table is better.

Please Close this Thread if got your Idea Clear

Thanks and Best Regards,

Faisal