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: 

Nested structure to internal table data transfer

kunal1812
Explorer
0 Kudos
2,313

Hello everyone,


I have a deep structure and using a Method , the data is getting populated inside the structure. Now i want to move this data from the deep structure into table. Could you please help me to solve this?

Example of deep structure:(nesting)
declare with table type—-> component with type structure—->component with type structure—->component with type table


thank you!

8 REPLIES 8

lemoreno
Participant
0 Kudos
1,751

Hi,

Sorry but i dont understand your requirement.

Which component do you need to move to a new table? The deep structure?

1,751

i want to move the components of the last table

lemoreno
Participant
0 Kudos
1,751

Hi again,

Try this.

- Create an internal table with the same type that the last table.

- Append the records in that temporal table.

- When you are ready to pass the last table to the structure do this:

DATA: ti_last_table_tmp TYPE tp_last_table,. " Same type that the last table
      st_last_table     LIKE LINE OF ti_last_table_tmp.

st_last_table-field1 = 'A'.
.
.
.
APPEND st_last_table TO ti_last_table_tmp.

APPEND LINES OF ti_last_table_tmp TO st_structure1-st_structure2-ti_last_table.

Hope it helps.

Regards.

Esteban

0 Kudos
1,751

Thanks!

This from table to structure, i want exact opposite procedure: from deep structure to table

lemoreno
Participant
0 Kudos
1,751

Hi again,

You have to create an internal table with type table of the first structure. When you are ready to pass the structure data to the deep internal table, you have to append the structure to that internal table.

APPEND st_structure1 TO ti_deep_table.

Sandra_Rossi
Active Contributor
1,751

It seems very easy, but I don't get what your issue is. If you post your code, it will be easier to answer.

0 Kudos
1,218

I want to move contents from <fs_it> table any to internal table LT-einarecord. how to do that

0 Kudos
1,138

Try this:

TYPES ty_table TYPE REF TO data.
DATA lt_einarecord TYPE TABLE OF ty_table.
FIELD-SYMBOLS <fs_it> TYPE ANY TABLE.

APPEND INITIAL LINE TO lt_einarecord ASSIGNING FIELD-SYMBOL(<fs_table>).
GET REFERENCE OF <fs_it> INTO <fs_table>.