Skip to Content
0
Former Member
Apr 18, 2014 at 06:22 AM

How to copy data to Internal table

354 Views

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.


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

Attachments

error.jpg (49.3 kB)