01-08-2014 10:22 AM
HI,
How to copy the Field-symbol table to standard internal table.
Please help me .....
My declaration type is ....
data: it_kna1 TYPE STANDARD TABLE OF kna1.
FIELD-SYMBOLS: <it_kna1> TYPE STANDARD TABLE.
if i use it_kna1 = <it_kna1> , no syntax eror,
But i got a dump .
Please help me to solve the problem......
Thanks and regards,
Vaigundaraja.
Moderator Message: Please do some research before posting.
Message was edited by: Kesavadas Thekkillath
01-08-2014 10:25 AM
assign it_kna1 to <it_kna1>.
If you access a field symbol without assigning it, it would result in a dump.
Kindly read documentation on field symbols.
01-08-2014 10:28 AM
Or you could get the field catalog and make an ASSIGN COMPONENT OF .. but it's longer
regards
Fred
01-08-2014 10:30 AM
Hi Raja ,
whenever you use field symbol use assign <intenal table> TO <fieldsymbol>
your code become as follow ...
data: it_kna1 TYPE STANDARD TABLE OF kna1.
FIELD-SYMBOLS: <it_kna1> TYPE STANDARD TABLE.
assign it_kna1 to <it_kna1> .
01-08-2014 10:48 AM
Hi -
You need to use ASSIGN.
Example -
TYPES : BEGIN OF t_itab,
value TYPE char20,
END OF t_itab.
DATA : itab TYPE STANDARD TABLE OF t_itab,
w_itab TYPE t_itab.
w_itab-value = 'KKKK ABC 12'.
APPEND w_itab TO itab.
w_itab-value = 'KKKZ MNP 657'.
APPEND w_itab TO itab.
w_itab-value = 'KKKZ XYZ 456'.
APPEND w_itab TO itab.
DATA : lv_itab(6) TYPE c VALUE 'ITAB[]'.
FIELD-SYMBOLS : <fs_table_xls> TYPE table,
ASSIGN (lv_itab) TO <fs_table_xls>.
01-08-2014 10:57 AM
Was the field-symbols already assigned, if yes you should not get a dump, except if you play with obsolete header lines requiring usage of [] to distinguish header line from internal table. So I will suppose it is not the case. But you don't actually want to copy a non defined object (the <FS>) to the table
Are you trying to assign the field-symbols to the table, then ASSIGN it_kna1 TO <it_kna1>, or can you explain your actual requirement ?
Regards,
Raymond