Skip to Content
author's profile photo Former Member
Former Member

Problem in ALV report using CL_SALV_TABLE

Hi,

We have a alv report containing around 110 columns. We are able to display. But the column titles are coming from data dictionary. We want to modify the column titles of all 110 fields. How to set the total columns titles at the same time ?

regards

Janaki Ram

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 20, 2012 at 04:42 AM

    Hello

    Please look the following code.

    data: lo_column type ref to cl_salv_column.

    data: lo_columns_item type ref to cl_salv_columns_table.

    data: lo_column_item type ref to cl_salv_column_table.

    try.

    lo_columns = go_alv->get_columns( ).

    lo_column = lo_columns->get_column( 'CURRENT_NAME' ).

    lo_column->set_long_text( 'NEW_NAME' ).

    *repeat above code for all the columns

    catch cx_salv_not_found. "#EC NO_HANDLER

    endtry.

    Better to make smal subroutine and pass the current name and new name of column ,

    Also see the standard program like SALV_DEMO_TABLE_LAYOUT

    Thanks

    Sandeep

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 20, 2012 at 07:01 AM

    Just read the documentation of the class or some googling with simple keywords to find SAP documents like Change of DDIC Reference for a Column, Column Header or Sorting by Columns in Columns (General) of ALV Object Model.

    Regards,

    Raymond

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.