Skip to Content
1
Former Member
Jul 12, 2007 at 07:48 AM

Employee details table.

245 Views

Hi,

I am trying to create the table with all the details of employee.

This is my program.

TYPES:

BEGIN OF TY_EMP,

EMPID(4) TYPE N,

ENAME(20) TYPE C,

DEPT(4) TYPE C,

SALARY TYPE I,

END OF TY_EMP.

DATA:

FS_EMP TYPE TY_EMP,

IT_EMP TYPE TABLE OF TY_EMP.

FS_EMP-EMPID = 1010.

FS_EMP-ENAME = 'XX'.

FS_EMP-DEPT = 'D100'.

FS_EMP-SALARY = 10000.

FS_EMP-EMPID = 1011.

FS_EMP-ENAME = 'YY'.

FS_EMP-DEPT = 'D100'.

FS_EMP-SALARY = 11000.

FS_EMP-EMPID = 1001.

FS_EMP-ENAME = 'ZZ'.

FS_EMP-DEPT = 'D200'.

FS_EMP-SALARY = 12000.

WRITE:/ FS_EMP-EMPID,FS_EMP-ENAME,FS_EMP-DEPT,FS_EMP-SALARY.

But now when iam executing it is showing only the last entry.

I want all of these to come in a table form with all the details.