cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Tables Problem

Former Member
0 Kudos
34

Hi,

I have this code:

FIELD-SYMBOLS: <ltable> TYPE ANY TABLE,

<ltable1> TYPE ANY TABLE,

<l_line> TYPE ANY,

<l_field> TYPE ANY.

And I fill the <ltable> with dynamically data and I want to assign this data to a Z structure that's a return table of my function.

If I try to do this code below, this doesn’t work fine but when I enter in the loop, this appends all fields concatenated in the first field.

DATA: BEGIN OF t_mystructure.

include STRUCTURE Z_MYSTRUCTURE.

data end of t_mystructure.

loop at <ltable> into t_mystructure.

move <ltable>-field to t_mystructure-field.

append t_mystructure.

endloop.

Z_MYSTRUCTURE have:

Field1 type char50

Field2 type char50

Field3 type char50

How can I do to transfer the data of <table> moving corresponding fields to my structure?

Thanks,

Accepted Solutions (1)

Accepted Solutions (1)

athavanraja
Active Contributor
0 Kudos

loop at <ltable> assigning <l_line>.

move-corresponding <l_line> to t_mystructure .

append t_mystructure .

endloop .

Regards

Raja

Answers (0)