<tab> - это собсна табличка, которую ты создал и заполнил,
<record> - строка <tab>
<cell> - ячейка строки
получаем имя файла от юзера:
Code:
call method cl_gui_frontend_services=>file_open_dialog
exporting
window_title = title
file_filter = filter " Эксель (*.XLS)|*.XLS
initial_directory = 'C:\'
multiselection = space
changing
file_table = ft
rc = rc
user_action = action.
if action eq 0.
read table ft into f_path index 1.
endif.
---------------------------------------------------------------------------
например, вывод в делимитированный текстовик (CSV):
Code:
if p_tabch eq 'X'. " tabulator
p_delim = cl_abap_char_utilities=>horizontal_tab.
endif.
describe field <tab> into fld_des.
loop at fld_des-types into t_types where idx_name gt 0.
ncomp = ncomp + 1.
read table fld_des-names into t_names-name
index t_types-idx_name.
condense t_names-name no-gaps.
if is_out-sline is initial.
is_out-sline = t_names-name.
else.
concatenate is_out-sline t_names-name
into is_out-sline separated by p_delim.
endif.
endloop.
concatenate is_out-sline cl_abap_char_utilities=>cr_lf into is_out-sline.
loop at <tab> assigning <record>.
do ncomp times.
assign component sy-index of structure <record> to <cell>.
write <cell> to tline.
condense tline.
replace all occurrences of p_delim in tline with '*'.
if sy-index eq 1.
concatenate is_out-sline tline
into is_out-sline.
else.
concatenate is_out-sline tline
into is_out-sline separated by p_delim.
endif.
enddo.
concatenate is_out-sline cl_abap_char_utilities=>cr_lf into is_out-sline.
endloop.
append is_out to it_out.
call function 'GUI_DOWNLOAD'
exporting
filename = f_path
filetype = 'ASC'
write_lf = space
confirm_overwrite = 'X'
tables
data_tab = it_out.
в общем, что-то вроде того =)