Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Well, I would say it is faster to do DIY then to search for something generic enough to help you. You can try following coding as basis. </p> <p>It does the plain recursion through the variable (be it table or structure) and it prints the fields found at bottom...</p> <pre><code>*&amp;---------------------------------------------------------------------* *&amp; Form print_structure *&amp;---------------------------------------------------------------------* 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;lt_table&gt; type any table, &lt;ls_table&gt; type any, &lt;lf_field&gt; type any, &lt;ls_dfies&gt; like line of lt_dfies. lr_typeref = cl_abap_typedescr=&gt;describe_by_data( im_data ). case lr_typeref-&gt;type_kind. when cl_abap_typedescr=&gt;typekind_table. " internal table assign im_data to &lt;lt_table&gt;. loop at &lt;lt_table&gt; assigning &lt;ls_table&gt;. perform print_structure using &lt;ls_table&gt;. endloop. when cl_abap_typedescr=&gt;typekind_struct1 or cl_abap_typedescr=&gt;typekind_struct2. " deep/flat structure lf_ddic_in = lr_typeref-&gt;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 &lt;ls_dfies&gt;. assign component &lt;ls_dfies&gt;-fieldname of structure im_data to &lt;lf_field&gt;. perform print_structure using &lt;lf_field&gt;. endloop. when others. " any field write im_data to lf_string. write: / lf_string. endcase. endform. "print_structure </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload