i created a copy of SAP database table SFLIGHT called ZFLIGHT99, but i need to copy a data from original table too. I tried to copy by report like
DATA itab1 TYPE TABLE OF SFLIGHT.
DATA itab2 TYPE TABLE OF ZFLIGHT99.
itab2[] = itab1[].
But it doesn't work. I know that i can use loop at, but in this case i have to write all fields from this table. Is there any other solution for that?
Please check the documentation for database insert. What you are doing is a copy of the internal table.
The most performant way will be INSERT FROM SELECT
(relevant docu). In contast to your own answer, this will not transfer data to the application server just to transfer it back to the database again. So this is more performant.
INSERT zpfli99 FROM ( SELECT * spfli ).