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

Difference between package size 1 and select single

Former Member
0 Likes
471

Hi,

Can anybody tell me the difference between package size 1 and select single?

which is to be used in what situation?

Thanks

Parag

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
430

Hi Parag Gavkar,

use SELECT SINGLE if your query should return only 1 record.

Due to performance issues the where-clause should be well defined.

Please refer to F1 Help, your issue is well documented.

regards

REA

3 REPLIES 3
Read only

Former Member
0 Likes
430

Hi,

Package size 1 means: 1 record(s) at a time selected form DB table.

Select *

from kna1

into itab package size1.

endselect.

If u r KNA1 table contain 50 recors, then this select will execute 50 times and get 1 record each time...

Kiran

Edited by: kiran vempati on Jul 23, 2009 2:44 PM

Read only

Former Member
0 Likes
431

Hi Parag Gavkar,

use SELECT SINGLE if your query should return only 1 record.

Due to performance issues the where-clause should be well defined.

Please refer to F1 Help, your issue is well documented.

regards

REA

Read only

Former Member
0 Likes
430

Hi,

check the below code

when we are using packet size 1 it is executing for all the records in the database i.e it is executing like loop.....endloop

SELECT *

FROM scarr

INNER JOIN spfli ON scarrcarrid = spflicarrid

INTO TABLE itab PACKAGE SIZE 1.

endselect.

where as select single * will execute only once based on where condition.

Thanks & Regards,

Sateesh.