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

table in a internal table

Former Member
0 Likes
968

I am creating a dynamic internal table where in i have to enter another table. the structure of table is decided by a fieldcatlog of type LVC_S_FCAT.

i want to know which field has to be filled which will identify the table.

<<text removed by moderator>>

Edited by: Matt on Dec 27, 2008 12:56 PM

I am creating a dynamic internal table where in i have to enter another table. the structure of table is decided by a fieldcatlog of type LVC_S_FCAT.

i want to know which field has to be filled which will identify the table.

<<text removed by moderator>>

Edited by: Matt on Dec 27, 2008 12:56 PM

8 REPLIES 8
Read only

Former Member
Read only

Former Member
0 Likes
946

hi Aveek,

i know to create a simple internal table

its about creating an internal table inside an internal table.

like :

data: BEGIN OF INTERNALTABLE,

........................

table1 TYPE <some table type>

END OF INTERNALTABLE.

Read only

Former Member
0 Likes
946

cheers

Aveek

Read only

Former Member
0 Likes
946

hi aveek,

u have gave me the link to create internal table statically.

how can i do the same (including a table into a internal table) dynamically...

thanks for reply.

Read only

Former Member
0 Likes
946

check this thread

cheers

Aveek

Read only

Former Member
0 Likes
946

hi Aveek,

i understand the concept of internal table in internal table,

the point is how can i acheive it at runtime.... that is while i create a dynamic internal table.....

Read only

matt
Active Contributor
0 Likes
946

Assuming you've got an outer table something like this:

field1
field2
field3
inner_table TYPE TABLE OF...

Instead, define it like this:

field1
field2
field3
p_inner TYPE REF TO data

Create your inner table dynamically. Then, where WA is your workarea for the outer table ( i.e. you READ and INSERT using wa ) use

GET REFERENCE OF <inner_table> INTO wa-p_inner. " Puts inner table into the outer workarea
* or
ASSIGN wa-p_inner->* TO <inner_table>. " Gets inner table from outer workarea.

Instead of storing the inner table within the outer table, you are storing a reference (the memory location) of the inner table.

matt

Read only

Former Member
0 Likes
946

This might solve your issue.

cheers

Aveek