‎2009 May 28 9:23 AM
Dear All,
Can i select the data from itab.
e.g; Select * from itab into another_itab.
is it possible?
Thanks and Regards,
Muhammad Sohail
‎2009 May 28 9:25 AM
Hi,
No, it is not possible.
aonother_itab[] = itab[].will be the right statement.
Regards,
Pankaj
‎2009 May 28 9:24 AM
You cannot perform Select operation on Internal tables. You need to do loop / read operations.
Hope this will help.
‎2009 May 28 9:25 AM
Hi,
No, it is not possible.
aonother_itab[] = itab[].will be the right statement.
Regards,
Pankaj
‎2009 May 28 9:25 AM
No, you cannot use SELECT * from internal table. SELECT is used only for Database Table.
You can read a single records from Internal Table usong READ TABLE
Else you can loop through the records , using LOOP..ENDLOOP
‎2009 May 28 9:42 AM
Hi,
its not possible ,compulsary you have to mention database table.
Regards,
Madhu
‎2009 May 28 9:44 AM
Dear Muhammad Sohail,
you cannot apply select statement on internal table. Still you can do any operation like Loop, read table on internal table.
Hope this will help you to resolve your query.
Regards,
Vijay
‎2009 May 28 9:53 AM
Hi,
SELECT clause is purely database oriented.
If you want to read data from one internal table into another, try using the MOVE statement or as the others rightly put it, use a READ statement on the internal table or LOOP...ENDLOOP on it.
‎2009 May 28 10:01 AM
Hi,
Select is only for database fetch. If you already have data in the internal table and if you wish to move the data to another internal table, Inside, loop at itab1, you can use the MOVE statment, MOVE CORRESPONDING statement etc. and append it to the second internal table.
Else you can read the internal table 1 and can move the values to the internal table 2.
Regards
Ramesh Sundaram
‎2009 May 28 10:03 AM
Hi,
If we can achieve something in a simple fashion then why should we go for a complicated one..
To copy the contents of an one internal table to the other, just copy the bodies like this.
itab_2[] = itab_1[]
P.S : Use of select statements have performance issues as it increases the number of database hits.
From the above statements it should be quite clear that select is used for database tables only.
No we can't copy the contents of one internal table to other using select statement.
Regards
Abhinab Mishra
‎2009 May 28 10:03 AM
hi select statement is only for database query
you can use read table( for single line read) or loop at (for multi line read )
can u be more specific about your operation on itab.
‎2009 May 28 10:21 AM
hi,
You can select data from itab using Read / loop
Synatx :
read table itab with key
or
loop at itab where