on 02-25-2009 5:08 PM
Dear experts,
how can i overwrite column names in an ALV if the column has a
data dictionary binding in the component controller context ?
set_text does not work.
Is there something like a link diagram where i can see which
inbound plugs are connected to which outbound plugs ?
Thanks and best regards
René
First in the future, please don't put two completely unrelated questions into the same forum thread.
As to your ALV column question, the SET_TEXT does work but you have to first disable the binding connection. You have to call the SET_PROP_DDIC_BINDING_FIELD first:
l_column = l_table->if_salv_wd_column_settings~get_column( 'POSTING_DATE' ).
data l_header type ref to cl_salv_wd_column_header.
l_header = l_column->get_header( ).
l_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 ).
l_header->set_text( `Posting Date` ).
As to your second question about link diagram. The only thing we have is the Window editor. It shows the navigation links in a tree - although not quite true graphical.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please find the code for column header in the alv.
data declaration for column settings
DATA : lr_column_settings TYPE REF TO if_salv_wd_column_settings,
lr_col_header TYPE REF TO cl_salv_wd_column_header,
lt_columns TYPE salv_wd_t_column_ref,
ls_column TYPE salv_wd_s_column_ref.
data declaration for table settings
DATA : lr_salv_wd_table_ctr TYPE REF TO iwci_salv_wd_table,
lr_table_settings_ctr TYPE REF TO if_salv_wd_table_settings,
lr_header_ctr TYPE REF TO cl_salv_wd_header.
Variables for drop-down and inpufield reference
DATA : lr_drdn_by_key TYPE REF TO cl_salv_wd_uie_dropdown_by_key,
lr_input_field TYPE REF TO cl_salv_wd_uie_input_field,
l_header TYPE string.
get ALV Component <CONTRACT_DETAILS>
lr_salv_wd_table_ctr = wd_this->wd_cpifc_payment_detail( ).
wd_this->alv_config_table = lr_salv_wd_table_ctr->get_model( ).
set visible row count
lr_table_settings_ctr ?= wd_this->alv_config_table.
lr_table_settings_ctr->set_visible_row_count( '5' ).
lr_table_settings_ctr->set_read_only( abap_false ).
lr_table_settings_ctr->set_grid_mode( ).
lr_table_settings_ctr->set_width(
EXPORTING
value = '980PX' ).
wd_this->alv_config_table->if_salv_wd_table_settings~set_data_check( if_salv_wd_c_table_settings=>data_check_on_cell_event ).
wd_this->alv_config_table->if_salv_wd_std_functions~set_pdf_allowed( abap_false ).
wd_this->alv_config_table->if_salv_wd_std_functions~set_view_list_allowed( abap_false ).
wd_this->alv_config_table->if_salv_wd_std_functions~set_edit_insert_row_allowed( abap_false ).
wd_this->alv_config_table->if_salv_wd_std_functions~set_edit_delete_row_allowed( abap_true ).
wd_this->alv_config_table->if_salv_wd_std_functions~set_export_allowed( abap_false ).
wd_this->alv_config_table->if_salv_wd_std_functions~set_edit_check_available( abap_false ).
CLEAR: l_header.
l_header = wd_assist->if_wd_component_assistance~get_text( '030' ).
lr_header_ctr = lr_table_settings_ctr->get_header( ).
lr_header_ctr->set_text( l_header ).
set text header for Columns.
CLEAR: l_header,lt_columns.
lr_column_settings ?= wd_this->alv_config_table.
lt_columns = lr_column_settings->get_columns( ).
LOOP AT lt_columns INTO ls_column.
CASE ls_column-id.
WHEN 'PAYMENT_METHOD'.
get header details
lr_col_header = ls_column-r_column->get_header( ).
disable DDIC field label*
CALL METHOD lr_col_header->set_prop_ddic_binding_field
EXPORTING
property = if_salv_wd_c_ddic_binding=>bind_prop_text
value = if_salv_wd_c_ddic_binding=>ddic_bind_none.
set user defined column header*
l_header = wd_assist->if_wd_component_assistance~get_text( key = '020' ).
lr_col_header->set_text( l_header ).
endcase.
endloop.
Regard
Manoj Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
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.