Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 8800

How to copy data to Internal table

$
0
0

Hi ABAP gurus,

 

I am new to ABAP programming. I am trying the copy data from a database Z table to an internal table. For the purpose I wrote the following code.

 

types: begin of t1,       "declaring the type of line.
employee
like zemployees_src-employee,
surname
like zemployees_src-surname,
forename
like zemployees_src-forename,
title like zemployees_src-title,
dob
like zemployees_src-dob,
end of t1.

types itab type standard table of t1.     "declaring the internal table type

data itab1 type itab.   "declaring the actual internal table
data wa_itab1 type t1.  "declaring the work area

select employee surname forename title dob from zemployees_src into wa_itab1.   "puting data into internal table through work area
append wa_itab1 to itab1.
endselect.

loop at itab1.
write / itab1.
endloop.


It is throwing the following error.

error.jpg


Please help me to resolve the problem and where I am making the mistake.


Viewing all articles
Browse latest Browse all 8800

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>