04-13-2009 7:38 AM
Hi All,
How can I get data from field symbols standard table.
Eq. i have declared as follows
Field-symbols : <fs_table> type standard table.
and i have filled some data to this table <fs_table>
Now looping the data and need to take back to one structure which is of same type as <fs_table>
if i try to assign values as follows i get an error message.
tablename-field1 = <fs_table>-field1. where field1 are same
04-13-2009 7:46 AM
Hi Praveen,
You need to create another field symbol and code like this.
FIELD-SYMBOLS: <field> TYPE ANY.
ASSIGN COMPONENT 'FIELD1' OF STRUCTURE <fs_table> TO <field>.
now, pass the value like this.
tablename-field1 = <field>.
regards,
Peter
04-13-2009 7:40 AM
How can you assign
itab1-field = <fs>-f1
you need to assign it like
wa-f1 = <fs>-f1
where wa and fs are of same type
also later on append wa to itab.
Regards
Bhanu
04-13-2009 7:51 AM
data: itab type table of table_name.
fieldsymbols: <wa> type line of itab.
loop at itab assigning <wa>
itab-field1 = <wa>-field1.
endloop.
04-13-2009 7:46 AM
Hi Praveen,
You need to create another field symbol and code like this.
FIELD-SYMBOLS: <field> TYPE ANY.
ASSIGN COMPONENT 'FIELD1' OF STRUCTURE <fs_table> TO <field>.
now, pass the value like this.
tablename-field1 = <field>.
regards,
Peter
04-13-2009 8:20 AM