2007 Jan 19 12:26 PM
hi all,
may i know why cannot do a select single to internal table but only can select single to working area or variable. any reason? besides select single, what others also cannot put into internal table?
thanks
2007 Jan 19 12:29 PM
Select single returns only one row. An internal table is not necessary for that. A work area/structure can very well hold one record.
Apart from select single, select .. upto 1 rows does not require an internal table.
Hope this helps.
Manoj
2007 Jan 19 12:31 PM
Hi,
We use this Select single only if we need a single line from the Database, so there is no point to store this line in to a internal table, so coming to performence wise also we do not use the Internal table to store a single record.
Regards
Sudheer
2007 Jan 19 12:31 PM
well í always thought it is self-explaining :P.
Anyway: a Select single get´s you expliciteley just ONE record.
So why would you put this record in a whole internal table if a working area is way enough?
if you want to have it in an internal table, declare one, and then do following after your select single statement:
append wa to itab.
2007 Jan 19 12:36 PM
Select single fetches alwats only one row(that to fist record of the available combination which u mentioned). so internal table is not required to capture one recored (unnessacery declaring internal table read index 1 and also table occupies extra memeryin program) so work area can very well hold one record.
and select upto 1 rows require an internal table.
Ramesh.