cancel
Showing results for 
Search instead for 
Did you mean: 

header/name of column in salv grid

Former Member
0 Kudos

hi,

does anybody know how to edit

the header/name of a column

in salv grid.

ami

Accepted Solutions (1)

Accepted Solutions (1)

former_member188685
Active Contributor
0 Kudos

>

> hi,

> does anybody know how to edit

> the header/name of a column

> in salv grid.

>

> ami

Mean you want to set the column title..?

Former Member
0 Kudos

right,

i want to edit the title of a column in salv.

can anybody help ?

kevin_neale
Explorer
0 Kudos

lo_columns = lo_alv->get_columns( ).

lo_columns->apply_ddic_structure( 'T001W' ).

lo_columns->set_key_fixation( co_true ).

lo_columns->set_optimize( ).

set_column_properties( changing co_columns = lo_columns ).

method set_column_properties.

data:

lo_column type ref to cl_salv_column,

lo_ref type ref to cx_root,

lt_fieldcat type salv_t_column_ref.

field-symbols:

<ls_fieldcat> type salv_s_column_ref.

lt_fieldcat = co_columns->get( ).

loop at lt_fieldcat assigning <ls_fieldcat>.

try.

lo_column = co_columns->get_column( <ls_fieldcat>-columnname ).

catch cx_salv_not_found into lo_ref.

message e037.

endtry.

if <ls_fieldcat>-columnname = 'WAERS'.

lo_column->set_shorttext( 'NEW NAME' ).

endif.

endloop.

endmethod. " set_column_properties

Answers (0)