Code: Alles auswählen.
DATA: BEGIN OF g_aus,
gc1(10) TYPE c VALUE 'spalte1',
gc2(10) TYPE c VALUE 'spalte2',
gc3(10) TYPE c VALUE 'spalte3',
END OF g_aus.
DATA: file TYPE string VALUE '/<verzeichnis>/test.xls',
aus TYPE string.
FIELD-SYMBOLS: <fs> TYPE ANY.
OPEN DATASET file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
DO.
ASSIGN COMPONENT sy-index OF STRUCTURE g_aus TO <fs>.
IF sy-subrc NE 0. EXIT. ENDIF.
IF sy-index = 1.
aus = <fs>.
ELSE.
CONCATENATE aus cl_abap_char_utilities=>horizontal_tab
<fs> INTO aus.
ENDIF.
WRITE: / <fs>.
ENDDO.
TRANSFER aus TO file.