Variante 1 (cl_salv_controller_metadata)
DATA: o_alv TYPE REF TO cl_salv_table.
...
DATA(o_fcat_lvc) = cl_salv_controller_metadata=>get_lvc_fieldcatalog( r_columns = o_alv->get_columns( )
r_aggregations = o_alv->get_aggregations( ) ).
DATA(o_fcat_slis) = cl_salv_controller_metadata=>get_slis_fieldcatalog( r_columns = o_alv->get_columns( )
r_aggregations = o_alv->get_aggregations( ) ).
Variante 2 (FuBa, obsolet)
DATA : it_fcat_lvc TYPE lvc_t_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'SPFLI' " Dictionary-Struktur
CHANGING
ct_fieldcat = it_fcat_lvc.
DATA: it_fcat_slis TYPE slis_t_fieldcat_alv.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'SPFLI' " Dictionary-Struktur
CHANGING
ct_fieldcat = it_fcat_slis.
Links