on 05-04-2012 1:18 PM
Hi all,
I am looking for a solution to delete the column header of WD4A List Viewer.
if this is not possible i would like to set and empty string the column headers- which also seems not to work.
cheers,
martin
Hi Martin,
Please refer the below code to change your ALV table Headers:
* Data Declaration for Table Header Column Chages
DATA: table_model TYPE REF TO cl_salv_wd_config_table,
column_header TYPE REF TO cl_salv_wd_column_header,
table TYPE TABLE OF salv_wd_s_column_ref,
wa TYPE salv_wd_s_column_ref.
DATA: lr_text1 TYPE REF TO cl_salv_form_text,
lr_text2 TYPE REF TO cl_salv_form_text.
DATA: lv_optxt TYPE string.
lo_cmp_usage = wd_this->wd_cpuse_alv_table( ).
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
lo_interfacecontroller = wd_this->wd_cpifc_alv_table( ).
table_model = lo_interfacecontroller->get_model( ).
CALL METHOD table_model->if_salv_wd_column_settings~get_columns
RECEIVING
value = table.
* Column Header Changes
LOOP AT table INTO wa.
column_header = wa-r_column->create_header( ).
IF wa-id = 'PERNR'. """""""""""" It should be one of your ALV
""""""""""" node's ATTRIBUTE name.
lv_optxt = 'Employee No.'.
ELSEIF wa-id = 'SNAME'.
lv_optxt = 'Employee Name.'.
ELSEIF wa-id = 'USRID_LONG'.
lv_optxt = 'E-Mail ID'.
ELSEIF wa-id = 'LANGU'.
lv_optxt = 'Language ID'.
ELSEIF wa-id = 'PLVL'.
lv_optxt = 'Proficiency Level'.
ELSEIF wa-id = 'BU'.
lv_optxt = 'Business Unit'.
ENDIF.
<<<<< Column Header Text >>>>>
CALL METHOD column_header->set_text
EXPORTING
value = lv_optxt.
<<<<<< Setting Tool tip for Column Header >>>>>>>>>
CALL METHOD column_header->set_tooltip
EXPORTING
value = lv_optxt.
ENDLOOP.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
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.