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: 

How to Change Column header in ALV List

Former Member
0 Kudos

hello,

is there a way to change the column header/label of an ALV list other than inheriting it from the source table it is bound to?

thanks,

sid

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Yes, you can. If you are using a field catalog, you can change the field labels in your program.

For example.



  data: fc_tmp type slis_fieldcat_alv .
  clear: fieldcat. refresh: fieldcat.

  clear: fc_tmp.
<b>  fc_tmp-reptext_ddic    = 'Material Number'.</b>
  fc_tmp-fieldname  = 'MATNR'.
  fc_tmp-tabname   = 'IMARA'.
  fc_tmp-outputlen  = '18'.
  fc_tmp-col_pos    = 2.
  append fc_tmp to fieldcat.


If you are using the MERGE funciton module to get your field catalog, then you just need to loop thru it and change the field which is holding the description, then modify the line of the field catalog.

REgards,

Rich Heilman

3 REPLIES 3

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Yes, you can. If you are using a field catalog, you can change the field labels in your program.

For example.



  data: fc_tmp type slis_fieldcat_alv .
  clear: fieldcat. refresh: fieldcat.

  clear: fc_tmp.
<b>  fc_tmp-reptext_ddic    = 'Material Number'.</b>
  fc_tmp-fieldname  = 'MATNR'.
  fc_tmp-tabname   = 'IMARA'.
  fc_tmp-outputlen  = '18'.
  fc_tmp-col_pos    = 2.
  append fc_tmp to fieldcat.


If you are using the MERGE funciton module to get your field catalog, then you just need to loop thru it and change the field which is holding the description, then modify the line of the field catalog.

REgards,

Rich Heilman

0 Kudos

thanks Rich

0 Kudos

HI RICH,I AM USING REUSE_ALV_FIELDCATALOG_MERGE AND HERE I WANT TO CHANGE THE COLUMN HEADER, CAN U PLZ HELP ME OUT.