'Employee No' 'Employee Name' 'Company Code'
'Employee No' 'Employee Name' 'Company Code'
'Employee No' 'Employee Name' 'Company Code'
types : begin
pernr
nachn
vorna
of ty_itab1,
type persno,
type nachn,
type vorna,
end of ty_itab1.
select pernr ename bukrs from pa0001 into table itab up to 30 rows .
loop at itab into wa.
write :/ wa-pernr,20 wa-ename,35 wa-bukrs.
endloop.
at line-selection.
case sy-lsind.
when
1.
select pernr nachn vorna from pa0002 into table itab1 up to 30 rows.
write :/'employee no',20 'first name',35 'last name'.
loop at itab1 into wa1.
write :/ wa1-pernr,20 wa1-nachn, 35 wa1-vorna.
endloop.
when 2.
endcase.
at user-command.
case sy-ucomm.
when 'SALL'.
v_box = 'X'.
v_box = 'X'.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = 'E:download.txt'
TABLES
DATA_TAB = itab1.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.
endcase.