‎2009 Jul 23 10:10 AM
Hi,
Can anybody tell me the difference between package size 1 and select single?
which is to be used in what situation?
Thanks
Parag
‎2009 Jul 23 1:26 PM
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
‎2009 Jul 23 10:14 AM
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
‎2009 Jul 23 1:26 PM
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
‎2009 Jul 23 3:40 PM
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.