‎2011 May 22 12:46 PM
HI All ,
I have field symbol structure (type any ) and i want to build a table from it how can i do that ?
the structure is like
str1
f1 type char10
f2 type string
f3 type i
etc
Regards
Joy
‎2011 May 23 2:12 AM
it depends which release of sap you are on but if it's one of the latest you can use this:
types:
begin of ty1,
f1(10) type c,
end of ty1.
data: dr type ref to data, l_entry type ty1.
field-symbols: <table> type table, <entry> type ty1.
CREATE DATA dr typE table of ty1.
ASSIGN dr->* TO <table>.
l_entry-f1 = 'stuff'.
append 'stuff' to <table>.
loop at <table> assigning <entry>.
write:/ <entry>-f1.
endloop.
‎2011 May 23 2:12 AM
it depends which release of sap you are on but if it's one of the latest you can use this:
types:
begin of ty1,
f1(10) type c,
end of ty1.
data: dr type ref to data, l_entry type ty1.
field-symbols: <table> type table, <entry> type ty1.
CREATE DATA dr typE table of ty1.
ASSIGN dr->* TO <table>.
l_entry-f1 = 'stuff'.
append 'stuff' to <table>.
loop at <table> assigning <entry>.
write:/ <entry>-f1.
endloop.
‎2011 May 23 7:17 AM
Please refer to sap help .
[http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb387a358411d1829f0000e829fbfe/content.htm]