Here is the code and the results..
FUNCTION ZTEST .
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(TABNAME) TYPE TABNAME
*" CHANGING
*" REFERENCE(EC_STRUCTURE) TYPE ANY
*"----------------------------------------------------------------------
DATA: l_dref_table_workarea TYPE REF TO data.
FIELD-SYMBOLS <fs> TYPE any.
CREATE DATA l_dref_table_workarea TYPE (tabname).
ASSIGN l_dref_table_workarea->* TO <fs>.
EC_STRUCTURE = <fs>.
ENDFUNCTION.
Execute...
Press SAVE and results are..