Code: Alles auswählen.
DATA it_vari TYPE TABLE OF vari.
DATA ls_vari TYPE vari.
DATA var TYPE TABLE OF RSVARVAR.
DATA ls_var TYPE RSVARVAR.
SELECT * FROM VARID
INTO CORRESPONDING FIELDS OF TABLE it_vari.
* get TVARV selection variables
loop at it_vari into ls_vari.
clear var. refresh var.
call FUNCTION 'RS_VARIANT_VARIABLES'
EXPORTING
PROGRAM = ls_vari-REPORT
VARIANT = ls_vari-variant
TABLES
VAR = var.
IF sy-subrc <> 0.
CONTINUE.
ENDIF.
* move the data to a listing table
LOOP AT var into ls_var.
WRITE: / ls_vari-REPORT, ls_vari-variant, ls_var-SELECTION, ls_var-variable.
endloop.
ENDLOOP.