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

ALV COLUMN NAME

Hi All,

Does anybody know how can I change a ALV´s column name?.

I have made my alv report but i wold like to change the name of one column and haven´t been able to do it.

Thanks for youir help

Gabriel P.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 20, 2005 at 03:25 PM

    Hi ,

    In you fieldcat internal table , modify the field FIELDCAT-REPTEXT_DDIC for the column which you want to change the column name before calling the ALV FM.

    Cheers.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 20, 2005 at 04:19 PM

    Hi,

    if you are using <b>FM REUSE_ALV_GRID_DISPLAY</b> then change your field_catalog....

    fc_tmp-reptext_ddic = 'COMPANY CODE'. " here you need to type column name what you want

    fc_tmp-fieldname = 'BUKRS'. " here you need to type field name of the table.

    
    
    form write_report.
      perform build_field_catalog.
      perform build_sort.
    * CALL ABAP LIST VIEWER (ALV)
      call function 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                it_fieldcat = fieldcat
                it_sort     = sort
    
           TABLES
                t_outtab    = itab.
    
    
    endform.
    
    **********************************************************
    *BUILD_FIELD_CATALOG
    **********************************************************
    form build_field_catalog.
      data: fc_tmp type slis_t_fieldcat_alv with header line.
      clear: fieldcat.
      refresh: fieldcat.
      clear: fc_tmp.
      fc_tmp-reptext_ddic    = 'COMPANY CODE'.
      fc_tmp-fieldname  = 'BUKRS'.
      fc_tmp-tabname   = 'ITAB'.
      fc_tmp-outputlen  = '8'.
      fc_tmp-col_pos    = 2.
      append fc_tmp to fieldcat.
      clear: fc_tmp.
      fc_tmp-reptext_ddic    = 'VENDOR NUMBER'.
      fc_tmp-fieldname  = 'LIFNR'.
      fc_tmp-tabname   = 'ITAB'.
      fc_tmp-outputlen  = '8'.
      fc_tmp-col_pos    = 2.
      append fc_tmp to fieldcat.
    
    ENDFORM.
    
    **********************************************************
    

    reward points for helpfull answers and close the thread if your question is solved.

    regards,

    venu.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 20, 2005 at 03:25 PM

    HI,

    Try modifying your field catalog internal table before passing it to the list display FM.

    Thanks,

    Ravi

    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.