Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

field labels in alv in webdynpro

hi all,

I am using standard table as dictionary structure for my context node .

So when i m seeing the ouput in ALV the header is coming up with field names . But I want to display field lables so that it can be understood by users .

Could you please send information on this .

thanks

Former Member
Former Member replied

Hi Santosh,

As i understood you want to change the columns headers and if this is right then you can make use of CL_SALV_WD_COLUMN_HEADER class to achieve it.

1. get the ref to all the columns

data: lt_columns type salv_wd_t_column_ref.

data: ls_column type salv_wd_s_column_ref.

lt_columns = lo_value->if_salv_wd_column_settings~get_columns().

2. read the column you want to add custom header

loop at lt_columns into ls_column.

case ls_column-id.

when 'MATNR'.

data lr_col_header type ref to cl_salv_wd_column_header.

lr_col_header = ls_column-r_column->create_header().

lr_col_header->set_text('Test Header').

endcase.

endloop.

this will set the column header as "test header" for the field matnr.

Thanks,

Abhishek

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question