2007 Oct 19 10:33 AM
Hi all
i declare an internal table. how to make it a table so that i can write it in sql?
Data: Begin of table1 occurs 20.
column1(30) type c.
end of table1.
<b>select column1 from table1 into corresponding field of table value_tab.</b>
thanks
Hi Gary,
I am not able to understand your intension, can you please write more clear.
Satish
2007 Oct 19 10:36 AM
Hi Gary,
I am not able to understand your intension, can you please write more clear.
Satish
2007 Oct 19 10:38 AM
U check my sql statement... can i tak the internal table as the sql table.
my internal table call table1.
my sql statement
<b>Select * from table1.</b>
Can i do that ?
2007 Oct 19 10:40 AM
Hi Gary, No you can not do that unless and untill table is a Dictionary table.
In your case based on the validations you can manipulate the data or move to an another internal table.
But what you are asking is not possible unless table1 is a dictionary table.
Regards
Gopi
2007 Oct 19 10:45 AM
Hi Gary,
Whenever you want to retrieve the data from the Table that is present in the data dictionary (database), we use SQL statements.
For the internal tables that we declare in our programs, we can use
loop at itab into wa_itab.
endloop.
or
read table itab into wa_itab with key fld1 = ' '.
Reward If Useful,
Regards,
Chitra
2007 Oct 19 10:41 AM
why do u want to write sql statement on internal table.
On internal table u can use
1. READ statement.
2.Loop at itab etc
2007 Oct 19 11:27 AM
hi Gary,
u need to write a code like
loop at itab into wa.
......
endloop.
to retrieve data from internal table
you can use SQL statements for the transparent tables that are stored in data dictionary.
regards,
sohi
2007 Oct 19 11:34 AM
YOU CAN'T USE SELECT....
USE READ STATEMENT....
http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
2007 Oct 19 11:34 AM
hi,
internal table is the user defined table inside the program...if we use select query.in that the fields which we use should be maintained in data dictionary..
Reward with points if helpful.
2007 Oct 24 7:19 AM
hi,
you can not do this since it is not a Dictionary table.
if you want to do the same
export the internal table using XML.
2007 Oct 24 7:55 AM
Hi,
U can use SELECT Query only to Standard tables. Pls use
READ Statement to retrieve datas from internal table.
Use READ Statement like below...
READ TABLE table1 INTO value_tab WITH KEY column1 = table1-column
or use LOOP AT table1...
Reward me if it is helpful.
Thanks & Regards,
Ramya.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |