Skip to Content
0
Former Member
Jul 22, 2005 at 01:41 AM

Deep Structure - Assigning Values To Fields

2557 Views

Hi All,

I know that this is a simple one but I am just not getting it... 😔

I pulled the following example code from an earlier thread. Here the code show how to read a value from a deep strucure:

LOOP AT <main_table> INTO <main_wa> .

LOOP AT <main_wa>-<inner_table> INTO <inner_wa> .

<var_1> = <inner_wa>-<field_to_be_read> .

...

ENDLOOP .

ENDLOOP .

That's OK - But how do I assign multiple values to the <inner_table>?

I am reading the values from another internal table - so, say for each record in <main_table> I would like to make 2 entries in <main_table>-<inner table>.

My struture is the following make-up (i.e. one embedded structure):

Field1 - Key

Field2

Field3

Field4

Field5

Table1 - Multiple Entries relating to key.

Any help would be much appreciated!

Cheers,

Niall