05-30-2016 3:36 PM
Hi ,
I have a dynamic deep internal table field symbol, for example
<lfs_data>
Header 1 | Header 2 | Header 3 | Header 4 | |
---|---|---|---|---|
employee id | employee no | xx | Internal table[] | |
employee id | employee no | yy |
|
How to read internal table from the field symbol ? means header 4 .
I tried to loop <lfs_data>, but I am getting dump.
field symbol : <fs> type any table.
loop <lfs_data> assigning <fs>. "getting dump here"
endloop.
Regards,
K.Pradeep.
05-30-2016 4:09 PM
05-30-2016 4:26 PM
As far as I understand your field symbol <lfs_data> has four fields, named Header1 ... Header4, whereby in field Header4 is a deep/internal table.
You can access to it this way:
LOOP AT <lfs_data>-header4 ASSIGNING FIELD-SYMBOL(<fs>).
Or in releases before NW 7.4 SP08:
FIELD-SYMBOLS <fs> LIKE LINE OF <lfs_data>-header4. " or TYPE xyz (whatever your internal table has)
LOOP AT <lfs_data>-header4 ASSIGNING <fs>.
05-30-2016 4:47 PM
05-30-2016 4:28 PM
Hi Pradeep,
Try below:
Field-symbols: <fs_1> type any, "Do not specify table
<fs_2> type any.
loop at <lfs_data> assigning <fs_1>.
assign component <field number> of structure <fs_1> to <fs_2>.
Endloop.
05-31-2016 6:15 AM