Code: Alles auswählen.
DATA: ref_itab TYPE REF TO data,
ref_wa TYPE REF TO data.
FIELD-SYMBOLS: <fs_itab> TYPE ANY TABLE,
<fs_wa> TYPE ANY,
<fs_dummy> TYPE ANY.
PARAMETERS: pa_tab TYPE dd02l-tabname DEFAULT 'SPFLI'.
START-OF-SELECTION.
CREATE DATA ref_itab TYPE TABLE OF (pa_tab) WITH NON-UNIQUE DEFAULT KEY.
ASSIGN ref_itab->* TO <fs_itab>.
SELECT * FROM (pa_tab)
INTO TABLE <fs_itab>
UP TO 10 ROWS.
CREATE DATA ref_wa LIKE LINE OF <fs_itab>.
ASSIGN ref_wa->* TO <fs_wa>.
LOOP AT <fs_itab> INTO <fs_wa>.
ASSIGN COMPONENT sy-index OF STRUCTURE <fs_wa> TO <fs_dummy>.
DO.
IF sy-subrc NE 0.
EXIT .
ENDIF.
WRITE: <fs_dummy>.
NEW-LINE.
ENDDO.
ENDLOOP.