Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

CL_SALV_TABLE=>FACTORY - how do I change heading and column headings

former_member498250
Participant
0 Kudos

Can someone tell me what I need to use to change the Report heading and also the column headings when using Call Method cl_salv_table=>Factory

1 ACCEPTED SOLUTION

anesh_kumar
Active Participant

Hi

use this code for report heading

  • get display settings -------------------------------------------------------------------------

l_display = l_table->get_display_settings( ).

l_display->set_striped_pattern( cl_salv_display_settings=>true ).

l_display->set_list_header( 'This is the heading - change ' ).

and for column heading

    • this will overwrite the data element specified in the data dictionary-------------------------

l_columns = l_table->get_columns( ).

l_column ?= l_columns->get_column( 'column name' ).

l_column->set_long_text( 'this is long text' ).

l_column->set_medium_text( 'this is medium text' ).

l_column->set_short_text( 'short text' ).

Regards

2 REPLIES 2

anesh_kumar
Active Participant

Hi

use this code for report heading

  • get display settings -------------------------------------------------------------------------

l_display = l_table->get_display_settings( ).

l_display->set_striped_pattern( cl_salv_display_settings=>true ).

l_display->set_list_header( 'This is the heading - change ' ).

and for column heading

    • this will overwrite the data element specified in the data dictionary-------------------------

l_columns = l_table->get_columns( ).

l_column ?= l_columns->get_column( 'column name' ).

l_column->set_long_text( 'this is long text' ).

l_column->set_medium_text( 'this is medium text' ).

l_column->set_short_text( 'short text' ).

Regards

0 Kudos

Thank you !