09-30-2021 3:08 PM
Hi Gurus,
I need to know, how to display full cell Technical Information in factory ALV (table name, field name, etc.). The standard way, F1 -> F9 shows me reduced info only without Table name, Table category and Field name.
"Standard" Technical Information:
"Reduced" Technical Information in factory ALV:
Thanks for the help! 🐵
09-30-2021 3:50 PM
If your question is about CL_SALV_TABLE, then by default it initializes the data element in the field catalog which has priority over the table and column names for F1.
You can clear the data element in the field catalog so that F1 displays the table and column names instead.
Minimal reproducible example:
REPORT.
SELECT * FROM sflight INTO TABLE @DATA(sflight_table).
CALL METHOD cl_salv_table=>factory
IMPORTING
r_salv_table = DATA(salv)
CHANGING
t_table = sflight_table.
salv->get_functions( )->set_all( ).
DATA(lo_columns) = salv->get_columns( ).
DATA(lt_column) = lo_columns->get( ).
LOOP AT lt_column ASSIGNING FIELD-SYMBOL(<ls_column>)
WHERE r_column IS BOUND.
<ls_column>-r_column->set_f1_rollname( space ).
ENDLOOP.
salv->display( ).
09-30-2021 3:50 PM
If your question is about CL_SALV_TABLE, then by default it initializes the data element in the field catalog which has priority over the table and column names for F1.
You can clear the data element in the field catalog so that F1 displays the table and column names instead.
Minimal reproducible example:
REPORT.
SELECT * FROM sflight INTO TABLE @DATA(sflight_table).
CALL METHOD cl_salv_table=>factory
IMPORTING
r_salv_table = DATA(salv)
CHANGING
t_table = sflight_table.
salv->get_functions( )->set_all( ).
DATA(lo_columns) = salv->get_columns( ).
DATA(lt_column) = lo_columns->get( ).
LOOP AT lt_column ASSIGNING FIELD-SYMBOL(<ls_column>)
WHERE r_column IS BOUND.
<ls_column>-r_column->set_f1_rollname( space ).
ENDLOOP.
salv->display( ).
10-01-2021 12:49 PM
Thank you, it works fine! 🐵
BTW, what is the alternative, lets say default way, how to see the Table name and Field name instead of using F1?
10-01-2021 1:35 PM
Why do you say "default"? I can answer but I don't see what means the "default way".
Users can see the table and field names by looking at the layout. The developer must enable the layout buttons, for instance with salv->get_functions( )->set_all( ) as I have shown in my code. In the layout screen > column selection, you can display the context menu to select "show technical field names". NB: it's the menu in the top, bottom or central parts of the layout screen.
10-01-2021 3:12 PM
I said "default" because of your "by default it initializes the data element in the field catalog which has priority over the table and column names for F1." 🐵
The "layout way" looks more complicated for me, so I'll stay with my F1 🐵 (nevertheless thank you a lot, it's good to know it)
Regards
Pavel