Skip to Content
0
Former Member
Jul 22, 2005 at 11:08 PM

Dynamic Tables Problem

12 Views

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,