data: your_file_name type string,
your_file_path type string,
the_full_path type string.
types:
begin of the_alv_structure,
field1(10) type c,
field2(10) type c,
end of the_alv_structure.
data: the_alv_itab type table of the_alv_structure.
data: wa like line of the_alv_itab.
wa-field1 = 'A1'.
wa-field2 = 'B1'.
append wa to the_alv_itab.
wa-field1 = 'A2'.
wa-field2 = 'B2'.
append wa to the_alv_itab.
wa-field1 = 'A3'.
wa-field2 = 'B3'.
append wa to the_alv_itab.
call method cl_gui_frontend_services=>file_save_dialog
exporting
default_extension = '.xls'
default_file_name = 'Text'
changing
filename = your_file_name
path = your_file_path
fullpath = the_full_path.
call method cl_gui_frontend_services=>gui_download
exporting
filename = the_full_path
write_field_separator = 'X'
changing
data_tab = the_alv_itab.
RETURN TO MAIN INDEX:
- Sample Programs On Uploading & Downloading Files.
- Sample Programs On HR ABAP.
- Sample Report Programs On ALV List/ Grid Display.
- Sample Programs On Selection Screen.
- Sample Programs On BDC.
.....Back To MAIN INDEX.
No comments:
Post a Comment