Ну, я бы сказал, что быстрее сделать DIY, чтобы найти что-то общее, чтобы помочь вам. Вы можете использовать следующую кодировку.
Это равнина рекурсии через переменную (будь то таблица или структура) и выводит поля, найденные на дне ...
*&---------------------------------------------------------------------*
*& Form print_structure
*&---------------------------------------------------------------------*
form print_structure using im_data.
data: lr_typeref type ref to cl_abap_typedescr,
lf_ddic_in type fieldname,
lt_dfies type ddfields,
lf_string type c length 200.
field-symbols: <lt_table> type any table,
<ls_table> type any,
<lf_field> type any,
<ls_dfies> like line of lt_dfies.
lr_typeref = cl_abap_typedescr=>describe_by_data(im_data).
case lr_typeref->type_kind.
when cl_abap_typedescr=>typekind_table. " internal table
assign im_data to <lt_table>.
loop at <lt_table> assigning <ls_table>.
perform print_structure using <ls_table>.
endloop.
when cl_abap_typedescr=>typekind_struct1 or
cl_abap_typedescr=>typekind_struct2. " deep/flat structure
lf_ddic_in = lr_typeref->get_relative_name().
call function 'DDIF_FIELDINFO_GET'
exporting
tabname = lf_ddic_in
all_types = 'X'
tables
dfies_tab = lt_dfies
exceptions
not_found = 1
others = 0.
check sy-subrc eq 0.
loop at lt_dfies assigning <ls_dfies>.
assign component <ls_dfies>-fieldname of structure im_data to <lf_field>.
perform print_structure using <lf_field>.
endloop.
when others. " any field
write im_data to lf_string.
write:/lf_string.
endcase.
endform. "print_structure
Вы имеете в виду логическую базу данных (LDB) ex. Таблицы с использованием NODE SFLIGHT, SCARR и т. Д.? – closebrace
Нет, я не говорю о логической базе данных. Я говорю о глубокой структуре (структуре, содержащей, возможно, другие структуры, таблицы, строки и т. Д.) – mydoghasworms