Code: Alles auswählen.
data :
"Tabelle" type standard table of ...
dein_feldcatalog type LVC_T_FCAT,
export_als_xstring type XSTRING,
choice TYPE if_salv_bs_xml=>s_type_xml_choice,
versio TYPE string,
ref_result_data TYPE REF TO cl_salv_ex_result_data_table,
tabelle_als_ref_to_data TYPE REF TO DATA.
....
GET REFERENCE OF "Tabelle" INTO tabelle_als_ref_to_data.
versio = if_salv_bs_xml=>version_26.
choice-version = if_salv_bs_xml=>version_26.
choice-xml_type = if_salv_bs_xml=>c_type_xlsx.
choice-gui_type = if_salv_bs_xml=>c_gui_type_gui.
ref_result_data = cl_salv_ex_util=>factory_result_data_table(
* T_SELECTED_ROWS = lt_lvc_row
* T_SELECTED_COLUMNS = lt_sel_cols
* T_SELECTED_CELLS = lt_sel_cells
r_data = tabelle_als_ref_to_data
* S_LAYOUT = gs_layo
t_fieldcatalog = dein_feldcatalog
* T_SORT = gt_sort
* T_FILTER = gt_filter
* T_HYPERLINKS = me->mt_hyperlinks
* S_CURRENT_CELL = ls_cur_cell
* HYPERLINK_ENTRY_COLUMN = ls_hyper_entry
* DROPDOWN_ENTRY_COLUMN = ls_dropdown_entry
* T_DROPDOWN_VALUES = lt_drdn )
* r_top_of_list = lr_form_tol
* r_end_of_list = lr_form_eol
).
cl_salv_bs_tt_util=>if_salv_bs_tt_util~transform(
EXPORTING xml_type = choice-xml_type
xml_version = versio
r_result_data = ref_result_data
xml_flavour = if_salv_bs_c_tt=>c_tt_xml_flavour_export
gui_type = choice-gui_type
IMPORTING xml = export_als_xstring ).