on 10-06-2009 1:01 PM
Hi,
I have created an ALV from a database table. Now when i execute the application it fetches the description for column headers from the database table. I have to give my own header description, how can i achieve.
Also i have some custom fields also, for them it takes description as attribute name i have to change this also.
plz suggest.
regards,
Pankaj Aggarwal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pankaj,
You have to remove the current DDIC text bindings.Use the code below:
DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings,
lr_col_header TYPE REF TO cl_salv_wd_column_header.
lr_column_settings ?= lo_value.
get table of column settings - each line one column
DATA: lt_columns TYPE salv_wd_t_column_ref.
lt_columns = lr_column_settings->get_columns( ).
loop over table - in each loop another column can be modified
DATA: ls_column TYPE salv_wd_s_column_ref.
define visible columns (fields) by naming them,
DATA: ls_tooltip TYPE string.
LOOP AT lt_columns INTO ls_column. " get header of column
lr_col_header = ls_column-r_column->get_header( ).
lr_col_header->SET_PROP_DDIC_BINDING_FIELD(
property = IF_SALV_WD_C_DDIC_BINDING=>BIND_PROP_TEXT
value = IF_SALV_WD_C_DDIC_BINDING=>DDIC_BIND_NONE ). "ignore the DDic Bindings
CASE ls_column-id.
WHEN 'Column-header'.
lr_col_header->set_text( 'New Text' ).
-
-
ENDCASE.
ENDLOOP.
Regards,
Arpan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.