* first call to suppress display of called programm and save
* both content and metadata (needed for fieldcatalog)
cl_salv_bs_runtime_info=>set( display = abap_false
metadata = abap_true
data = abap_true ).
* Then call your submitted program
submit (p_repid) using selection-set p_vari
and return.
* You will need something like:
data: ls_metadata type cl_salv_bs_runtime_info=>s_type_metadata.
data: lr_alv type ref to data.
field-symbols: <alv_cont> type standard table.
* to get hold of the alv-content:
cl_salv_bs_runtime_info=>get_data_ref( importing r_data = lr_alv ).
* Of course, You'll need a field-symbol to make it accessible.
assign lr_alv->* to <alv_cont>.
* Now we're going to fetch the field-catalog (in ls_metadata-t_fcat)
ls_metadata = cl_salv_bs_runtime_info=>get_metadata( ).
Now, the rest is up to you, to figure out.
It really works great, once you get the principle.
Hope it helps.
Best regards - Jörg