Olá, teste este código
DATA w_tref TYPE REF TO data.
DATA infty_table_type_ref TYPE REF TO cl_abap_tabledescr.
DATA infty_type_ref TYPE REF TO cl_abap_structdescr.
DATA infotype_structure TYPE string.
*
FIELD-SYMBOLS <pnnnn> TYPE any.
FIELD-SYMBOLS <pnnnn_tab> TYPE STANDARD TABLE.
CALL METHOD cl_ecpao_structure_generator=>get_structure_name
EXPORTING
infty = infotype
IMPORTING
structure_name = infotype_structure.
CALL METHOD cl_ecpao_structure_generator=>get_table_type_stru
EXPORTING
structure = infotype_structure
IMPORTING
table_type_ref = infty_table_type_ref
struc_type_ref = infty_type_ref.
CREATE DATA w_tref TYPE HANDLE infty_table_type_ref.
ASSIGN w_tref->* TO <pnnnn_tab>.
<pnnnn_tab> = pnnnn_primary_tab.
LOOP AT <pnnnn_tab> ASSIGNING <pnnnn>.
* <pnnnn>-NIMSS
ENDLOOP.