on 01-07-2008 10:02 AM
Hi ,
I have created a alv dynamically and setting the properties of the column like column header text but its not getting updated .
see the below code for ref.
lr_column_settings ?= lr_config_table.
data:
lt_columns type salv_wd_t_column_ref.
lt_columns = lr_column_settings->get_columns( ).
data: lr_column type ref to cl_salv_wd_column,
lr_header type ref to cl_salv_wd_column_header,
ls_column type salv_wd_s_column_ref.
loop at lt_columns into ls_column.
case ls_column-id.
when 'MOIST'.
lr_column = ls_column-r_column.
lr_header = lr_column->get_header( ).
lr_header->set_text( 'Moisture %' ).
I am able to set the alv properties like visible row count etc ..
can anybody help out in this issue
Regards
Yash
I was just able to change my headers with the following:
data:
lt_columns type salv_wd_t_column_ref,
ls_column type salv_wd_s_column_ref,
lr_header type ref to cl_salv_wd_column_header.
lt_columns = lo_value->if_salv_wd_column_settings~get_columns( ).
loop at lt_columns into ls_column.
lr_column = ls_column-r_column.
lr_header = lr_column->get_header( ).
lr_header->set_ddic_binding_field( if_salv_wd_c_column_settings=>ddic_bind_title ).
lr_header = lr_column->create_header( ).
case ls_column-id.
when 'CNT_LINEITEMS'.
lr_column->r_header->set_text( 'Line Items' ).
when 'VAL_OPEN'.
lr_column->r_header->set_text( 'Open Amount' ).
when others.
endcase.
endloop
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Yashpal,
I had faced this problem earlier.
You can overcome this on lines of this code
DATA: lr_col TYPE REF TO cl_salv_wd_uie_text_view.
Set heading for
lr_column = lr_column_settings->get_column( 'ROLE_TXT' ).
lr_column_hdr = lr_column->create_header( ).
lr_column_hdr->set_text( 'ROLE' ).
This works pretty perfect.
Hope this solves your problem.
Regards,
Ismail.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Yash,
Did you checked the spelling of Moist in caps and small ? . And also check ls_column-id, whether its getting values correctly.
Regards
Sarath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.