Code: Alles auswählen.
FIELD-SYMBOLS: <result> TYPE ANY TABLE.
ASSIGN result_tab->* TO <result>. "<result> hat alle Daten
MODIFY (iv_tab_name) FROM TABLE @<result>. " iv_tab_name ist ein Importparameter der Methode
Code: Alles auswählen.
FIELD-SYMBOLS: <tab> TYPE ANY TABLE.
DATA tablename TYPE string.
DATA tablestructure TYPE REF TO cl_abap_structdescr.
DATA tabletype TYPE REF TO cl_abap_tabledescr.
DATA tabledata TYPE REF TO data.
tablename = '<MY_TABLE>'.
tablestructure ?= cl_abap_typedescr=>describe_by_name( tablename ).
tabletype = cl_abap_tabledescr=>create( p_line_type = tablestructure ).
CREATE DATA tabledata TYPE HANDLE tabletype.
ASSIGN tabledata->* TO <tab>.
select * from <my_table> into table <tab> up to 1 rows......
IF NOT <tab> IS INITIAL.
MODIFY (tablename) FROM TABLE @<tab>.
WRITE: / sy-subrc.
ENDIF.