2008 Jan 29 9:03 AM
Hi,
I have a FM where TABLES data_tab TYPE ANY TABLE.
Inside the FM I would like to create structure typed as line of this table. I know that generic type can't be used to create other types but maybe there is other way to do this.
I tried this way:
FIELDS-SYMBOLS: <fs> type any.
Loop at data_tab.
assign data_tab to <fs>. "now <fs> contains line of data_tab...
exit.
Endloop.
"..but...
data: begin of ls_struct.
include structure <fs>. "...here I receive 'The included type has no type'
data: end of ls_struct.
Any ideas?
Thx in advance.
Hi,
I have a FM where TABLES data_tab TYPE ANY TABLE.
Inside the FM I would like to create structure typed as line of this table. I know that generic type can't be used to create other types but maybe there is other way to do this.
I tried this way:
FIELDS-SYMBOLS: <fs> type any.
Loop at data_tab.
assign data_tab to <fs>. "now <fs> contains line of data_tab...
exit.
Endloop.
"..but...
data: begin of ls_struct.
include structure <fs>. "...here I receive 'The included type has no type'
data: end of ls_struct.
Any ideas?
Thx in advance.
2008 Jan 29 9:09 AM
Hi Marcin,
data: begin of ls_struct.
include structure <fs>.
data: end of ls_struct.
In this case <fs> has no structure at complie time.
anyways u have not assigned <fs> to any data type which has structure, hence the error.
regards,
Vaibhav Modi.
2008 Jan 29 9:19 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |