2012 Jan 20 9:13 PM
I am trying to assign a field symbol to an internal table and i get the errr of type incompatble, even though the table and field symbol are both typed the same. I am not all that familiar with the rules of using field symbols. The code is:
TYPES: BEGIN OF rep_type,
buyer TYPE marc-ekgrp,
del_time TYPE marc-plifz,
mrp_cont TYPE marc-bearz,
mrp_type TYPE marc-dismm,
mat_grp TYPE mara-matkl,
proc_time TYPE marc-bearz,
plan_time TYPE marc-fxhor,
cov_profile TYPE marc-rwpro,
saf_stock TYPE marc-eisbe,
END OF rep_type.
DATA: rep_tab TYPE STANDARD TABLE OF rep_type.
FIELD-SYMBOLS: <rep_ref> TYPE rep_type.
...
ASSIGN rep_tab TO <rep_ref>.
The error is rep_tab and <rep_ref> are type incompatible.
Is there something more about typing with field symbols that I am missing?
2012 Jan 20 9:22 PM
rep_tab is a table.
<rep_ref> is referenced to a structure.
Rob
2012 Jan 20 9:22 PM
rep_tab is a table.
<rep_ref> is referenced to a structure.
Rob
2012 Jan 20 9:25 PM
Hi
For this you can define Field symbol as :
DATA: <FS> TYPE ANY TABLE.
Best regards
2012 Jan 23 4:59 AM
Use
ASSIGN rep_type TO <rep_ref>.
assign structure rep_type to field symbol.