[{ALLOW view All}]
[{ALLOW edit Authenticated}]
{{{
*------------------------------------------
* Change reference field for column header
*------------------------------------------
FORM setheaderfieldreference USING ALV_COLS TYPE ref to CL_SALV_COLUMNS
value(out_field)
value(ddic_table)
value(ddic_field).
DATA: ALV_COL TYPE REF TO CL_SALV_COLUMN,
ALV_DDIC TYPE SALV_S_DDIC_REFERENCE.
TRY.
alv_cols->get_column( EXPORTING columnname = out_field
RECEIVING value = alv_col ).
CATCH cx_salv_not_found.
WRITE: / 'ERROR: Spalte ', out_field, ' nicht gefunden.'.
ENDTRY.
alv_ddic-table = ddic_table.
alv_ddic-field = ddic_field.
alv_col->set_ddic_reference( value = alv_ddic ).
ENDFORM. "setHeaderFieldReference
}}}