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

Populate data from internal table

Former Member
0 Likes
598

Hi Experts,

DATA: BEGIN OF it_tables OCCURS 0,

file(30),

tabname TYPE tabname,

END OF it_tables.

DATA: ldo_data TYPE REF TO data,

ld_tabnam TYPE tabname.

FIELD-SYMBOLS: <lt_itab> TYPE table.

ld_tabnam = it_tables-tabname.

CREATE DATA ldo_data TYPE STANDARD TABLE OF (ld_tabnam).

ASSIGN ldo_data->* TO <lt_itab>.

ld_tabnam = it_tables-file.

In the above code it_tables-tabname contains the structure name by which <lt_itab> structure is declared. it_tables-file contains the internal table name.

Now the next step is, i want to populate data from the internal table using ld_tabnam into <lt_itab>.

Is this possible?

Thanks & Ragards

Akshay

5 REPLIES 5
Read only

Former Member
0 Likes
560

HI,

Refer to this link..how to populate the dynamic internal table

Read only

0 Likes
560

Hi,

my problem is that my internal table name is there in the variable. And i want to populate the table in dynamically created table using the variable as the internal table name is changing.

Regards

Akshay

Read only

Former Member
0 Likes
560

Hi Akshay,

check my wiki in https://wiki.sdn.sap.com/wiki/x/_oCtAg .

Hope it supports your requirment.

Regards,

Anirban

Read only

0 Likes
560

Hi Anirban,

In your wiki you have populated the dynamic internal table by using p_tab in which you are entering the standard SAP table name. But in my case i want to populate dynamic table by using the internal table whose name is in the field ld_tabnam.

Regards

Akshay

Read only

0 Likes
560

Hi Experts,

Can any one please help me on the issue above?

Thanks & Regards

Akshay