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

internal table convert to a table

Former Member
0 Likes
2,027

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,

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.

10 REPLIES 10
Read only

Former Member
0 Likes
1,337

Hi Gary,

I am not able to understand your intension, can you please write more clear.

Satish

Read only

0 Likes
1,337

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 ?

Read only

0 Likes
1,337

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

Read only

0 Likes
1,337

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

Read only

Former Member
0 Likes
1,337

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

Read only

Former Member
0 Likes
1,337

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

Read only

Former Member
0 Likes
1,337
Read only

Former Member
0 Likes
1,337

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.

Read only

nikhil_bose
Active Contributor
0 Likes
1,337

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.

Read only

Former Member
0 Likes
1,337

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.