Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

REPORT ZP41.

types :begin of ty_emp,


empno type i,
empname(20) type c,
empdesign(20) type c,
end of ty_emp.

data : t_emp1 type TABLE OF ty_emp,


wa_emp type ty_emp.

CLEAR wa_emp.
wa_emp-empno = 4.
wa_emp-empname = 'Raju'.
wa_emp-empdesign = 'Manager'.
APPEND wa_emp to t_emp1.

CLEAR wa_emp.
wa_emp-empno = 14.
wa_emp-empname = 'Ashok'.
wa_emp-empdesign = 'Director'.
APPEND wa_emp to t_emp1.

CLEAR wa_emp.
wa_emp-empno = 16.
wa_emp-empname = 'Kiran'.
wa_emp-empdesign = 'Employee'.
APPEND wa_emp to t_emp1.

CLEAR wa_emp.
wa_emp-empno = 11.
wa_emp-empname = 'Mahesh'.
wa_emp-empdesign = 'CEO'.
APPEND wa_emp to t_emp1.

CLEAR wa_emp.
wa_emp-empno = 8.
wa_emp-empname = 'Rakesh'.
wa_emp-empdesign = 'Employee'.
APPEND wa_emp to t_emp1.

perform sub1 using t_emp1.

form sub1 using lt_emp1.


* loop at lt_emp1 into wa_emp. " syntax error lt_emp1 is not recognised internal
* write : / wa_emp-empno.
* wa_emp-empname
* wa_emp-empdesign
* endloop.
endform.

You might also like